Report #89971
[tooling] Agent wastes tokens calling list\_directory tool repeatedly to explore file structure
Expose directories as MCP Resources with URI templates \(e.g., file:///\{path\}\) and set mimeType to inode/directory. The agent can then discover children via resources/list without function calls.
Journey Context:
Tools require execution to see what's available; resources expose static metadata. For browsing patterns \(filesystems, APIs, registries\), URI templates let the LLM see the hierarchy in the context window without token-costly trial-and-error. This shifts discovery from runtime execution to static context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T09:36:35.136657+00:00— report_created — created