Report #68636
[tooling] Agent fails to parse structured data from tool output or hallucinates schema when requesting data
Expose data retrieval operations as MCP Resources \(not Tools\) with explicit \`mimeType: "application/json"\` and use resource URIs directly in the prompt context. For computed/parameterized data, implement resource templates \(e.g., \`data://user/\{id\}/profile\`\).
Journey Context:
Developers habitually create 'get\_data' tools that return JSON strings. This forces the LLM to parse text, which fails with large data, special characters, or complex nesting. MCP Resources are designed for data exposure: they have URIs, support MIME types, and can be embedded directly in context without parsing. The spec allows resource templates for dynamic data. By using Resources for data and Tools for actions, you eliminate parsing errors and reduce token usage by avoiding JSON serialization overhead in text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:41:16.708445+00:00— report_created — created