Documentation
¶
Overview ¶
Package gitignoretemplates implements MCP tools for GitLab Gitignore Templates API.
markdown.go provides Markdown formatting functions for gitignore template MCP tool output.
register.go wires gitignoretemplates MCP tools to the MCP server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatGetMarkdown ¶
FormatGetMarkdown formats the get output as markdown.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown formats the list output as markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all gitignore template MCP tools.
Types ¶
type GetInput ¶
type GetInput struct {
Key string `json:"key" jsonschema:"Template key (e.g. Go, Python, Node),required"`
}
GetInput is the input for getting a gitignore template.
type GetOutput ¶
type GetOutput struct {
toolutil.HintableOutput
Name string `json:"name"`
Content string `json:"content"`
}
GetOutput is the output for getting a gitignore template.
type ListInput ¶
type ListInput struct {
Page int64 `json:"page,omitempty" jsonschema:"Page number for pagination"`
PerPage int64 `json:"per_page,omitempty" jsonschema:"Items per page"`
}
ListInput is the input for listing gitignore templates.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Templates []TemplateListItem `json:"templates"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListOutput is the output for listing gitignore templates.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List lists all available gitignore templates.
type TemplateListItem ¶
TemplateListItem represents a gitignore template in a list.