Documentation
¶
Overview ¶
markdown.go provides Markdown formatting functions for namespace MCP tool output.
Package namespaces implements MCP tools for GitLab namespace operations including listing, getting, checking existence, and searching namespaces.
register.go wires namespaces MCP tools to the MCP server.
Index ¶
- func FormatExistsMarkdown(out ExistsOutput) *mcp.CallToolResult
- func FormatExistsMarkdownString(out ExistsOutput) string
- func FormatListMarkdown(out ListOutput) *mcp.CallToolResult
- func FormatListMarkdownString(out ListOutput) string
- func FormatMarkdown(out Output) *mcp.CallToolResult
- func FormatMarkdownString(out Output) string
- func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type ExistsInput
- type ExistsOutput
- type GetInput
- type ListInput
- type ListOutput
- type Output
- type SearchInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatExistsMarkdown ¶
func FormatExistsMarkdown(out ExistsOutput) *mcp.CallToolResult
FormatExistsMarkdown formats a namespace existence check as a Markdown CallToolResult.
func FormatExistsMarkdownString ¶
func FormatExistsMarkdownString(out ExistsOutput) string
FormatExistsMarkdownString renders a namespace existence result as a Markdown string.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) *mcp.CallToolResult
FormatListMarkdown formats a list of namespaces as a Markdown CallToolResult.
func FormatListMarkdownString ¶
func FormatListMarkdownString(out ListOutput) string
FormatListMarkdownString renders a list of namespaces as a Markdown string.
func FormatMarkdown ¶
func FormatMarkdown(out Output) *mcp.CallToolResult
FormatMarkdown formats a single namespace as a Markdown CallToolResult.
func FormatMarkdownString ¶
FormatMarkdownString renders a single namespace as a Markdown string.
func RegisterMeta ¶
func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
RegisterMeta registers the gitlab_namespace meta-tool.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers individual namespace tools.
Types ¶
type ExistsInput ¶
type ExistsInput struct {
ID string `json:"id" jsonschema:"Namespace path to check for existence,required"`
ParentID int64 `json:"parent_id,omitempty" jsonschema:"Parent namespace ID to scope the check"`
}
ExistsInput contains parameters for checking namespace existence.
type ExistsOutput ¶
type ExistsOutput struct {
toolutil.HintableOutput
Exists bool `json:"exists"`
Suggests []string `json:"suggests,omitempty"`
}
ExistsOutput represents the result of a namespace existence check.
func Exists ¶
func Exists(ctx context.Context, client *gitlabclient.Client, input ExistsInput) (ExistsOutput, error)
Exists checks whether a namespace path is available.
type GetInput ¶
type GetInput struct {
ID string `json:"id" jsonschema:"Namespace ID or path,required"`
}
GetInput contains parameters for getting a namespace by ID.
type ListInput ¶
type ListInput struct {
Search string `json:"search,omitempty" jsonschema:"Filter namespaces by search term"`
OwnedOnly bool `json:"owned_only,omitempty" jsonschema:"If true return only namespaces owned by the authenticated user"`
TopLevelOnly bool `json:"top_level_only,omitempty" jsonschema:"If true return only top-level namespaces"`
Page int64 `json:"page,omitempty" jsonschema:"Page number for pagination (default 1)"`
PerPage int64 `json:"per_page,omitempty" jsonschema:"Number of items per page (default 20, max 100)"`
}
ListInput contains parameters for listing namespaces.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Namespaces []Output `json:"namespaces"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListOutput represents a paginated list of namespaces.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List returns a paginated list of namespaces visible to the user.
func Search ¶
func Search(ctx context.Context, client *gitlabclient.Client, input SearchInput) (ListOutput, error)
Search searches namespaces by query string.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Kind string `json:"kind"`
FullPath string `json:"full_path"`
ParentID int64 `json:"parent_id,omitempty"`
AvatarURL string `json:"avatar_url,omitempty"`
WebURL string `json:"web_url,omitempty"`
MembersCountWithDescendants int64 `json:"members_count_with_descendants,omitempty"`
BillableMembersCount int64 `json:"billable_members_count,omitempty"`
Plan string `json:"plan,omitempty"`
Trial bool `json:"trial,omitempty"`
}
Output represents a single namespace.
type SearchInput ¶
type SearchInput struct {
Query string `json:"query" jsonschema:"Search query string for namespaces,required"`
}
SearchInput contains parameters for searching namespaces.