Expand description
The MCP tool layer: typed functions over SharedState plus the registry
the server advertises. Transport-agnostic — the rmcp adapter in
server.rs and the Admin API’s prompt renderer both call into here.
Modules§
- cache
purge_cache– the Admin API’s DELETE /api/cache/{id}, for agents.- catalog
- Read tools over static knowledge: node types, vars, status, config export.
- config
- Read tools over the stored gateway config, plus standalone validation.
- debug
- Read tools over debug mode: trace listing/inspection and the sandbox.
- writes
- Write tools. Every mutation builds a full candidate
GatewayConfig, then either validates it (dry_run) or commits it through the configuredConfigStore— exactly the path the Admin API takes.
Structs§
- ToolDef
- Static description of one tool. The MCP tool registry, advertised only
by the
mcptransport (src/mcp/server.rs) — the Admin API exposes prompts, not tools. - Tool
Error - A domain failure surfaced to the agent as an MCP tool error (never a
JSON-RPC error):
{code, message, errors?, hint?}.
Statics§
- TOOLS 🔒
Functions§
- args
- Deserializes tool arguments, reporting schema mismatches as
invalid_input. - call
- Executes a tool. Scope is not checked here (see
server.rs). - parse_
payload - Accepts a payload either as a JSON object or as a YAML document in a string — agents naturally write the YAML the docs show.
- schema_
of - JSON Schema (draft 2020-12, as schemars 1 emits) for a tool’s arguments,
with the
$schema/titlenoise removed. Only used to buildTOOLSbelow, which ismcp-only (the Admin API exposes prompts, not tools). - tool_
def - Looks up a tool by name.
- tool_
defs - Every tool, in the order clients see them.
Type Aliases§
- Json
Object - A JSON object, as MCP tool arguments arrive.