Skip to content

fix(mcp): instructions say singular collection but schema is plural#606

Open
talison wants to merge 1 commit intotobi:mainfrom
talison:fix-mcp-instructions-collections-plural
Open

fix(mcp): instructions say singular collection but schema is plural#606
talison wants to merge 1 commit intotobi:mainfrom
talison:fix-mcp-instructions-collections-plural

Conversation

@talison
Copy link
Copy Markdown

@talison talison commented Apr 26, 2026

Summary

The MCP query tool's input schema accepts collections: z.array(z.string()) (src/mcp/server.ts:309) but the auto-generated instructions string handed to clients on initialize says:

Collections (scope with collection parameter):

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:

Collections (scope with collections parameter — array of names):

Verified collections is the only schema field accepting collection scope (no other singular collection parameter exists in src/mcp/).

Test plan

  • Local rebuild: bun run build
  • qmd mcp --http --port 9471 → connect a client → confirm instructions carries the new wording

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant