elicitationtools

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 14 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL