Report #58614
[frontier] Hardcoding tool schemas in agent prompts breaks when tools update
Use MCP's capability discovery \(tools/list with templates\) to dynamically build agent prompts from server capabilities at runtime; cache schemas with ETag validation
Journey Context:
Agents ship with static tool descriptions in system prompts. When the underlying API adds a required parameter, the agent sends invalid requests based on stale knowledge, causing 400 errors. The fix: dynamic capability discovery via MCP. On agent startup \(and periodically\), call \`tools/list\` to fetch current schemas, descriptions, and even example templates. Build the system prompt dynamically: 'You have access to: \[insert fresh schema\]'. Cache with ETag to avoid re-fetching, but validate cache on tool execution failure. Tradeoff: cold-start latency. Alternative: semantic versioning of tools with backward compatibility, but doesn't solve the discovery problem for new capabilities.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:52:17.783834+00:00— report_created — created