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.
| Adapter | What it talks to |
|---|---|
McpSession | an MCP server, over an injected line transport (stdio or in-memory) |
HttpTool | an HTTP endpoint restricted to an allowlist of METHOD path pairs |
LocalProcess | a 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§
- Http
Tool - An HTTP endpoint restricted to an allowlist.
- Local
Process - A sandboxed local process tool.
- McpSession
- A provider backed by an MCP session.
- McpTool
Def - One tool exposed by an MCP server.
- Memory
Transport - An in-memory transport: requests are answered by a closure.
- Stdio
Transport - 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.