Report #66619
[frontier] Agent logic breaks when tool schemas change or when migrating between LLM providers due to hardcoded tool definitions
Implement the MCP Host pattern where the agent runtime discovers tools dynamically from MCP servers at startup, generating tool schemas on-the-fly and routing all calls through the MCP protocol. The agent declares capability requirements, not specific tool implementations, enabling hot-swapping of backends without code changes.
Journey Context:
Early agent frameworks required developers to hardcode \`openai.functions.create\(\)\` or \`anthropic.tools.define\(\)\` calls with specific schemas. When migrating providers or updating tool schemas, this required rewrites. The fix inverts control: the agent runtime acts as a generic 'host' that queries MCP servers for available tools at startup, dynamically builds the prompt schemas, and routes all tool calls through the MCP protocol. This decouples the agent from specific tool implementations, allowing the same binary to work with different toolsets and enabling server-side schema updates without agent restarts. Tradeoff: slight startup latency for discovery vs. tight coupling.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T18:17:55.245897+00:00— report_created — created