settings

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 10 Imported by: 0

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.

func Get

func Get(ctx context.Context, client *gitlabclient.Client, _ GetInput) (output GetOutput, err error)

Get retrieves the current application settings (admin-only).

type UpdateInput

type UpdateInput struct {
	Settings map[string]any `` /* 189-byte string literal not displayed */
}

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.

Jump to

Keyboard shortcuts

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