Documentation
¶
Overview ¶
Package mcpserver registers the gateway's tools in the go-sdk server.
Input: tools/call requests that passed the edge (the caller's identity is in RequestExtra.TokenInfo). Output: a structured result, or a *jsonrpc.Error in the single error format. One wrapper serves every tool: the bucket of the tool (if it has one), the input schema, the taint check for tools with an effect, the service, the output schema, and one audit_log row.
The tools have the same names in every configuration of the benchmark (option WithMode). The register* functions below say which service and which schemas a mode puts behind a name; the wrapper is the same for all of them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(st *store.Store, reader quarantine.QuarantinedReader, dec tools.Decider, log *slog.Logger, opts ...Option) *mcp.Server
New builds the MCP server with the tools of the mode registered. reader is the quarantined reader behind edi.extract_note; nil switches that tool off. dec is the policy that decides the tools with an effect.
Types ¶
type Option ¶
type Option func(*server)
Option changes how New builds the server.
func WithMode ¶
WithMode makes the server play a configuration of the benchmark (default mode.Full).
func WithPlain ¶
WithPlain gives the open tools of the modes plain and reqhash the clients of the other systems. The mode reqhash also switches on the stored answers.
func WithUpstream ¶
WithUpstream gives the server the upstream MCP servers whose pinned tools it passes on as up.<server>.<tool>.