Documentation
¶
Overview ¶
Package mcp is GTB's glue over the go/mcp module, and the link that gives a tool the mcp feature. A blank import from the tool's main (the generator writes cmd/<name>/mcp.go to do so) declares the feature as a link kind and contributes the `mcp` command to the root, with the framework's conventions applied once (spec 0201 D1, spec 0202 D1). Nothing else in the framework imports go/mcp, so a binary without the import carries neither the module nor the MCP SDK.
Index ¶
Constants ¶
const Feature = props.McpCmd
Feature is the feature this import declares: props.McpCmd, kept there as the ID so a main that names it links nothing.
const PackagePath = "gitlab.com/phpboyscout/go-tool-base/pkg/mcp"
PackagePath is this package's import path, the ConstPackage the descriptor carries: for a link, the package to blank-import.
Variables ¶
This section is empty.
Functions ¶
func BindingOptions ¶
func BindingOptions() []mcpcobra.BindingOption
BindingOptions are GTB's conventions for the Cobra binding: exposure by the tree's own markers (spec 0089), the global flags withheld, and the wrapper's feature as the search group.
func NewCmdMCP ¶
NewCmdMCP builds the `mcp` command for a tool: exposure from the command tree's own markers, the framework's global flags withheld, operations grouped by feature, the publication mode from props.Tool.MCP, the tool's identity, and logs on the invocation's error stream at the level the root's --debug also moves (stdout carries the protocol). extra options come last, so a host or a test can add or override.
Types ¶
This section is empty.