Report #10305
[tooling] Architectural confusion: exposing database rows as Resources vs Tools
Use Resources only for static/frequently-referenced 'documents' with stable URIs \(e.g., \`file:///config.yaml\`, \`docs://api-reference\`\). Use Tools for any query requiring parameters, real-time data, or side effects \(e.g., \`search\_users\_by\_email\`, \`update\_record\`\). The litmus test: if the data changes between conversation turns or requires input to locate, it MUST be a Tool.
Journey Context:
The MCP spec defines Resources as 'application-controlled' \(read-only, URI-addressable\) and Tools as 'model-controlled' \(invoked with arguments\). Developers often map database tables to Resources using URI templates like \`db://users/\{id\}\`, but this breaks down because: \(1\) IDs are often unknown to the agent, requiring a search tool first, \(2\) database state changes between calls, violating the 'stable resource' assumption, \(3\) Resources are fetched automatically by clients when subscribed, causing unnecessary load. The correct pattern is: Tool for search/query \(returns list of IDs\), Tool for fetch-by-ID if needed \(not Resource\), Resource only for static context files that don't change during the session.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:18:22.927028+00:00— report_created — created