Documentation
¶
Overview ¶
markdown.go provides Markdown formatting functions for application settings MCP tool output.
register.go wires settings MCP tools to the MCP server.
Package settings implements MCP tool handlers for GitLab application settings. It wraps the SettingsService from client-go v2. These are admin-only endpoints requiring administrator access.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatGetMarkdown ¶
func FormatGetMarkdown(out GetOutput) *mcp.CallToolResult
FormatGetMarkdown formats application settings into a concise markdown summary.
func FormatUpdateMarkdown ¶
func FormatUpdateMarkdown(out UpdateOutput) *mcp.CallToolResult
FormatUpdateMarkdown formats the updated settings response.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all application settings tools on the MCP server.
Types ¶
type GetInput ¶
type GetInput struct{}
GetInput is the input for getting application settings (no parameters needed).
type GetOutput ¶
type GetOutput struct {
toolutil.HintableOutput
Settings map[string]any `json:"settings"`
}
GetOutput contains the full application settings as a JSON map.
type UpdateInput ¶
UpdateInput is the input for updating application settings. Settings is a map of setting keys to their new values, matching the JSON field names from the GitLab API (snake_case).
type UpdateOutput ¶
type UpdateOutput struct {
toolutil.HintableOutput
Settings map[string]any `json:"settings"`
}
UpdateOutput contains the updated application settings.
func Update ¶
func Update(ctx context.Context, client *gitlabclient.Client, input UpdateInput) (output UpdateOutput, err error)
Update modifies application settings (admin-only). It accepts a map of setting keys and values, JSON-round-trips them into UpdateSettingsOptions, and sends to the GitLab API.