Skip to main content

Module tool

Module tool 

Source
Expand description

Tool handles: MCP sessions, HTTP/OpenAPI endpoints, local processes.

Tools are capabilities like everything else, which means a tool handle inherits the same guarantees: no ambient authority, attenuation-only narrowing, budget accounting and drop notification.

AdapterWhat it talks to
McpSessionan MCP server, over an injected line transport (stdio or in-memory)
HttpToolan HTTP endpoint restricted to an allowlist of METHOD path pairs
LocalProcessa sandboxed child process: allowlisted program, no shell, scrubbed environment

Every adapter returns a Response::Value built from JSON, never a raw string dump, and every adapter refuses a call outside its policy with rpc/tool-policy.

Structs§

HttpTool
An HTTP endpoint restricted to an allowlist.
LocalProcess
A sandboxed local process tool.
McpSession
A provider backed by an MCP session.
McpToolDef
One tool exposed by an MCP server.
MemoryTransport
An in-memory transport: requests are answered by a closure.
StdioTransport
A child-process MCP transport speaking JSON-RPC over stdin/stdout.

Traits§

McpTransport
A line-oriented JSON-RPC transport used by McpSession.

Functions§

json_to_value
Convert JSON into an RPC value.
value_to_json
Convert an RPC value into JSON.