Help us shape the future of Go! Take the 2026 Go Developer Survey

metadata

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 6 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 FormatGetMarkdown

func FormatGetMarkdown(out GetOutput) string

FormatGetMarkdown renders the instance metadata as the card of one object, with the Kubernetes Agent Server as a nested object of its own: its version and its two addresses belong to KAS rather than to GitLab, and reading "Version" twice in one flat list said otherwise.

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