fix(mcp): instructions say singular collection but schema is plural#606
Open
fix(mcp): instructions say singular collection but schema is plural#606
collection but schema is plural#606Conversation
…s plural The query tool's input schema accepts `collections: z.array(z.string())` (server.ts:309), but the auto-generated instructions string handed to MCP clients on initialize said: Collections (scope with `collection` parameter): Agents that follow the instructions verbatim pass `collection: "obsidian"` which the schema ignores, silently widening the search to every collection. The cost is recall degradation, not an error — easy to miss. Updates the instructions to the actual parameter name and clarifies the shape (`array of names`) so callers don't need to read the schema to guess. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The MCP
querytool's input schema acceptscollections: z.array(z.string())(src/mcp/server.ts:309) but the auto-generated instructions string handed to clients on initialize says:So agents that follow the instructions verbatim pass
collection: "obsidian", the schema ignores it, and the search silently widens across every collection. The cost is recall degradation, not an error — easy to miss without instrumentation.This PR changes one word and adds the shape hint:
Verified
collectionsis the only schema field accepting collection scope (no other singularcollectionparameter exists insrc/mcp/).Test plan
bun run buildqmd mcp --http --port 9471→ connect a client → confirminstructionscarries the new wording