metadata

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package metadata implements MCP tools for the GitLab Metadata API.

The package fetches server version, revision, Enterprise edition status, and Kubernetes Agent Server metadata, then renders those values as structured JSON and Markdown for MCP tool responses.

The package wraps the GitLab Metadata API:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionSpecs

func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec

ActionSpecs returns canonical specs for metadata actions exposed as MCP tools. The single get route is projected into the dynamic, meta, individual, and audit surfaces by the action catalog (ADR-0004).

func FormatGetMarkdown

func FormatGetMarkdown(out GetOutput) string

FormatGetMarkdown formats metadata as markdown.

Types

type GetInput

type GetInput struct{}

GetInput is the input (no params).

type GetOutput

type GetOutput struct {
	toolutil.HintableOutput
	Version    string  `json:"version"`
	Revision   string  `json:"revision"`
	KAS        KASInfo `json:"kas"`
	Enterprise bool    `json:"enterprise"`
}

GetOutput is the output for metadata.

func Get

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

Get retrieves GitLab instance metadata via the GitLab Metadata API (GET /metadata). Useful for discovering the running GitLab version, the KAS (Kubernetes Agent Server) configuration, and the Enterprise/Ultimate flag.

type KASInfo

type KASInfo struct {
	Enabled             bool   `json:"enabled"`
	ExternalURL         string `json:"external_url"`
	ExternalK8SProxyURL string `json:"external_k8s_proxy_url"`
	Version             string `json:"version"`
}

KASInfo represents the KAS (Kubernetes Agent Server) metadata.

Jump to

Keyboard shortcuts

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