Documentation
¶
Overview ¶
markdown.go provides human-readable Markdown formatters for project aliases.
Package projectaliases implements MCP tools for GitLab project alias management. Project aliases allow accessing projects via alternative names (admin-only feature).
register.go wires project alias MCP tools to the MCP server.
Index ¶
- func Delete(ctx context.Context, client *gitlabclient.Client, in DeleteInput) error
- func FormatListMarkdown(out ListOutput) string
- func FormatOutputMarkdown(out Output) string
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type CreateInput
- type DeleteInput
- type GetInput
- type ListInput
- type ListOutput
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(ctx context.Context, client *gitlabclient.Client, in DeleteInput) error
Delete removes a project alias by name.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown formats a list of project aliases as a Markdown table.
func FormatOutputMarkdown ¶
FormatOutputMarkdown formats a single project alias as Markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers MCP tools for GitLab project alias operations.
Types ¶
type CreateInput ¶
type CreateInput struct {
Name string `json:"name" jsonschema:"The alias name to create,required"`
ProjectID int64 `json:"project_id" jsonschema:"The numeric project ID to alias,required"`
}
CreateInput holds parameters for creating a new project alias.
type DeleteInput ¶
type DeleteInput struct {
Name string `json:"name" jsonschema:"The alias name to delete,required"`
}
DeleteInput holds parameters for deleting a project alias.
type GetInput ¶
type GetInput struct {
Name string `json:"name" jsonschema:"The alias name to look up,required"`
}
GetInput holds parameters for retrieving a specific project alias.
type ListInput ¶
type ListInput struct{}
ListInput holds parameters for listing project aliases (no params needed).
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Aliases []Output `json:"aliases"`
}
ListOutput represents a list of project aliases.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, _ ListInput) (ListOutput, error)
List retrieves all project aliases (admin-only).
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
ProjectID int64 `json:"project_id"`
Name string `json:"name"`
}
Output represents a single project alias.
func Create ¶
func Create(ctx context.Context, client *gitlabclient.Client, in CreateInput) (Output, error)
Create creates a new project alias.