Documentation
¶
Overview ¶
Package server owns the MCP plumbing shared by every tool: the registry, argument decoding, result and error conversion, annotations, the per-call log line and the warnings logged once.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds the MCP server and the tools that the enabled groups let through.
func (*Registry) Add ¶
Add registers t unless its group is disabled by --tools. It panics on a programming error: empty title, duplicate name, or an array in the input schema without items.
type Tool ¶
type Tool struct {
Group string // schema|query|explain|stats|health|index|locks
Def *mcp.Tool // Name, Description, InputSchema; Annotations are set by Add
Title string // required; the annotation title
Writes bool // true only for execute_sql in unrestricted mode
Handler func(ctx context.Context, args json.RawMessage) (string, error)
}
Tool is one MCP tool, registered with Registry.Add.