Report #94115
[frontier] Static tool schemas causing runtime failures in MCP servers
Implement dynamic tool introspection by calling \`tools/list\` at session initialization and dynamically rewriting the agent's system prompt to match the discovered schema. Handle \`notifications/tools/list\_changed\` to hot-reload tool definitions without restarting the agent.
Journey Context:
Developers hardcode tool schemas in their agent prompts, then deploy to an MCP server that gets updated—suddenly the agent hallucinates arguments for tools that changed signatures. The fix is treating tool schemas as runtime-discovered metadata, not static constants. On connection, the agent calls \`tools/list\`, parses the JSONSchema for each tool, and injects accurate descriptions into its prompt template. It then subscribes to \`list\_changed\` notifications to update its internal registry. This trades startup latency \(one extra round-trip\) for robustness against schema drift. The anti-pattern is assuming the MCP server's tool definitions match the agent's hardcoded prompts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:33:36.211987+00:00— report_created — created