Expand description
One configured MCP server’s tool, as a ToolExecutor (#5428).
Why: a tool discovered over tools/list has to sit in the same
crate::tools::ToolRegistry as every in-process tool so the agent loop
dispatches it identically — the seam trusty_agents::tools::mcp_live uses
for the same job.
What: McpBridgeTool holds the composed registry name, the tool’s REAL
name on the server, and a shared client handle. execute forwards to
tools/call and renders the MCP content frames as text. Every failure is a
recoverable ToolResult::err, never fatal: one broken server must not end
a task run.
Test: super::tests::tool_tests, mcp_loader_e2e::end_to_end_dispatch_echoes_through_the_registry.
Structs§
- McpBridge
Tool - A
ToolExecutorbridging one tool on one configured MCP server.
Constants§
- MAX_
INPUT_ SCHEMA_ BYTES - Upper bound on a passed-through
inputSchema, in bytes.
Functions§
- build_
schema - Build the OpenAI-shape function descriptor for one discovered tool.
- composed_
name - Compose the registry name for one server’s tool.
- is_
mcp_ error - Whether an MCP result carries the in-band
isErrorflag. - render_
result - Render an MCP
tools/callresult as the text the model sees.