Documentation
¶
Overview ¶
Package elicitationtools implements interactive MCP tool handlers powered by the elicitation capability. These tools guide users through step-by-step prompts to create GitLab issues, merge requests, releases, and projects with confirmation before execution.
Index ¶
- func CancelledResult(message string) *mcp.CallToolResult
- func ConfirmAction(ctx context.Context, req *mcp.CallToolRequest, message string) *mcp.CallToolResult
- func IssueCreate(ctx context.Context, req *mcp.CallToolRequest, client *gitlabclient.Client, ...) (issues.Output, error)
- func MRCreate(ctx context.Context, req *mcp.CallToolRequest, client *gitlabclient.Client, ...) (mergerequests.Output, error)
- func ProjectCreate(ctx context.Context, req *mcp.CallToolRequest, client *gitlabclient.Client, ...) (projects.Output, error)
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- func ReleaseCreate(ctx context.Context, req *mcp.CallToolRequest, client *gitlabclient.Client, ...) (releases.Output, error)
- func UnsupportedResult(toolName string) *mcp.CallToolResult
- type IssueInput
- type MRInput
- type ProjectInput
- type ReleaseInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelledResult ¶
func CancelledResult(message string) *mcp.CallToolResult
CancelledResult delegates to elicitation.CancelledResult.
func ConfirmAction ¶
func ConfirmAction(ctx context.Context, req *mcp.CallToolRequest, message string) *mcp.CallToolResult
ConfirmAction delegates to elicitation.ConfirmAction.
func IssueCreate ¶
func IssueCreate(ctx context.Context, req *mcp.CallToolRequest, client *gitlabclient.Client, input IssueInput) (issues.Output, error)
IssueCreate guides the user through creating a GitLab issue via step-by-step elicitation prompts for title, description, labels, and confidentiality, then confirms before calling issues.Create.
func MRCreate ¶
func MRCreate(ctx context.Context, req *mcp.CallToolRequest, client *gitlabclient.Client, input MRInput) (mergerequests.Output, error)
MRCreate guides the user through creating a GitLab merge request via step-by-step elicitation prompts for branches, title, description, labels, and merge options, then confirms before calling mergerequests.Create.
func ProjectCreate ¶
func ProjectCreate(ctx context.Context, req *mcp.CallToolRequest, client *gitlabclient.Client, _ ProjectInput) (projects.Output, error)
ProjectCreate guides the user through creating a GitLab project via step-by-step elicitation prompts for name, description, visibility, README initialization, and default branch, then confirms before calling projects.Create.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools wires elicitation-powered interactive tools to the MCP server.
func ReleaseCreate ¶
func ReleaseCreate(ctx context.Context, req *mcp.CallToolRequest, client *gitlabclient.Client, input ReleaseInput) (releases.Output, error)
ReleaseCreate guides the user through creating a GitLab release via step-by-step elicitation prompts for tag name, release name, and description, then confirms before calling releases.Create.
func UnsupportedResult ¶
func UnsupportedResult(toolName string) *mcp.CallToolResult
UnsupportedResult returns a structured error tool result when the MCP client does not support elicitation. Suggests alternative non-elicitation tools.
Types ¶
type IssueInput ¶
type IssueInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path where the issue will be created"`
}
IssueInput is the minimal input for interactive issue creation.
type MRInput ¶
type MRInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path where the MR will be created"`
}
MRInput is the minimal input for interactive MR creation.
type ProjectInput ¶
type ProjectInput struct {
ProjectID string `json:"project_id,omitempty" jsonschema:"Optional: pre-fill project ID or path for tools that need it"`
}
ProjectInput is the minimal input for interactive project creation.
type ReleaseInput ¶
type ReleaseInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path where the release will be created"`
}
ReleaseInput is the minimal input for interactive release creation.