Documentation
¶
Overview ¶
Package elicitationtools implements interactive MCP tools that gather missing values through the MCP elicitation capability before calling GitLab actions.
The package orchestrates guided issue, merge request, project, and release creation over the same GitLab APIs used by the corresponding domain packages.
Index ¶
- func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
- func CancelledResult(message string) *mcp.CallToolResult
- func ConfirmAction(ctx context.Context, req *mcp.CallToolRequest, message string) *mcp.CallToolResult
- func FormatResult(result any) *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 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 ActionSpecs ¶
func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
ActionSpecs returns canonical specs for standalone interactive elicitation actions.
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 FormatResult ¶
func FormatResult(result any) *mcp.CallToolResult
FormatResult renders elicitation outputs and expected control outcomes.
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 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{}
ProjectInput is empty because interactive project creation elicits every field.
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.