Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP tool reference

API-level reference for the tools mcpx exposes to MCP clients. For the route and CLI mapping of every operation, see Parity. For the protocol, see MCP.

This page describes the surface as implemented in internal/mcpserver/server.go (hand-written tools) and internal/mcpserver/ops.go (generated tools). It documents behaviour; it does not change it.

Surfaces

SurfaceToolsSource
Hand-written12internal/mcpserver/server.go, Tools()
Generatedone mcpx_<op> per operationinternal/mcpserver/ops.go, OpTools
Dynamicadapter, OpenAPI, recipe, reactive, passthrough, rawinternal/cli/serve.go

Dynamic tools exist only when their upstream or configuration is present. Their names are derived from the upstream: <adapter>_<tool>, OpenAPI operationId (with _2-style suffixes for collisions), recipe_<name>, and <namespace>_<tool> on the raw surface (?codemode=false).

Hand-written tools

ToolParametersPurpose
mcpx_namespacesnoneList configured namespaces.
mcpx_catalogbudget, biasCatalog of available tools, sized to a budget.
mcpx_typesnamespacesTypeScript signatures for namespaces.
mcpx_searchquery, limitSearch tools by name or description.
mcpx_callnamespace, tool, argumentsCall one upstream tool.
mcpx_execsource, timeoutSecRun a Code Mode script.
mcpx_logsince, level, event, limitRead daemon log entries.
mcpx_statsdimension (enum)Usage and timing statistics.
mcpx_registryquery, limitSearch the server registry.
mcpx_statusnoneDaemon status.
mcpx_batchcalls, stopOnError, parallelRun several calls in one request.
batch_callas mcpx_batchAlias of mcpx_batch. The reactive-surface version has a different schema.

Generated tools

Each operation in internal/api/ops.go Ops() produces one mcpx_<op> tool, except:

  • operations covered by a hand-written tool (status, namespaces, search, types, catalog, call, call_path, batch, exec);
  • streaming operations (events);
  • operations marked NoTool (secrets_set).

Input schemas come from each operation’s Params through InputSchema(). Annotations are derived from the operation:

AnnotationValue
readOnlyHint!Mutating
idempotentHint!Mutating || Idempotent
destructiveHintfrom the operation
openWorldHinttrue

The per-operation name, method, path and CLI mapping is in Parity. Because that table is generated from Ops(), prefer it over any hand-maintained list.

Return values

  • Operation tools return pretty-printed JSON text, or raw text when the operation sets Text.
  • An empty upstream body returns (the daemon answered with an empty body).
  • Tool failures return a result with isError: true and the error text. Text the tool produced before failing is kept ahead of the error.

Errors

ConditionResult
Invalid parametersJSON-RPC error -32602.
Upstream JSON-RPC errorRelayed as UpstreamError.
Unknown name on the raw surfaceno tool named "<name>" on the raw surface (codemode=false).

Known gaps

  • Tool inputs and outputs are not yet validated against their JSON Schemas (see Protocol, known gaps).
  • Operation counts in interfaces and HTTP API predate the current operation set; the live count comes from Ops().