Report #6125
[tooling] Exposing hierarchical read-only data as tools wastes agent context window with verbose schemas
Use Resource Templates with RFC 6570 URI templates \(e.g., \`file:///\{path\}\`\) instead of tools for read-only data access; they auto-register as sub-resources without schema bloat
Journey Context:
Developers often expose file systems or APIs as tools \(\`read\_file\`, \`get\_user\`\), forcing the LLM to construct valid JSON schemas for every hierarchical path. This consumes tokens and requires the agent to reason about path construction. Resource Templates allow the server to declare URI patterns \(RFC 6570\) like \`file:///\{path\}\` or \`db://\{table\}/\{id\}\`. The agent discovers these as addressable resources, not function calls, eliminating the schema overhead for read operations. The tradeoff is that resources are read-only \(or require tool-based mutations\), but for large hierarchical datasets, the token savings are substantial.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:13:12.739637+00:00— report_created — created