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

surfaces

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package surfaces projects standalone runtime and interactive tool specs into visible MCP surfaces and dynamic catalog routes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToolCatalog

func AddToolCatalog(catalog *actioncatalog.Catalog, specs []actioncatalog.SurfaceToolSpec, opts CatalogOptions) (*actioncatalog.Catalog, error)

AddToolCatalog projects surface specs into a catalog used by Dynamic discovery/execution.

func ExcludedToolSpecs added in v3.1.0

func ExcludedToolSpecs(specs []actioncatalog.SurfaceToolSpec, excludeTools []string) (excluded map[string]struct{}, unmatched []string, err error)

ExcludedToolSpecs resolves an --exclude-tools list against surface specs and returns the tool names of the specs it removes, together with the entries that named none of them, in the order the operator wrote them.

The rule is the action catalog's, asked rather than restated: the specs are assembled into a catalog of their own, unfiltered, and actioncatalog.Catalog.FilterExcludedToolNames judges it, so a group name, an individual tool name and a canonical action ID reach a standalone utility exactly as they reach a catalog action. Each surface used to keep a copy of its own for these tools, and the copies had drifted apart: the dynamic one matched the tool and the group name, the meta and individual ones the registered name alone, and none the canonical ID, which is the one spelling that means the same thing on every surface.

The names are the ones the specs register under, which is what the pass over registered tools removes on the meta and individual surfaces and what AddToolCatalog leaves out on the dynamic one. An empty list builds nothing, since AddToolCatalog asks on every call and most calls exclude nothing.

func StandaloneToolSpecs

func StandaloneToolSpecs(client *gitlabclient.Client) []actioncatalog.SurfaceToolSpec

StandaloneToolSpecs returns visible utility tools that remain outside ordinary GitLab API meta-tool dispatchers.

func ToolGroupSpecs

ToolGroupSpecs groups surface specs into catalog group specs.

Types

type CatalogOptions

type CatalogOptions struct {
	ExcludeToolNames []string
}

CatalogOptions controls projection of standalone surface tools into an action catalog.

It carries the operator's exclusions and nothing about read-only mode: the dynamic surface applies read-only mode and a token's scope to the standalone actions once they have joined the catalog (tools.NarrowForReading), which files what each removed as withheld, and a projection that dropped the writes first left those flows answered as unknown.

Jump to

Keyboard shortcuts

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