Skip to content

fix(search): declare singular query in ctx_search schema - #1230

Open
JoAdo07 wants to merge 1 commit into
mksglu:mainfrom
JoAdo07:fix/ctx-search-singular-query
Open

JoAdo07 wants to merge 1 commit into
mksglu:mainfrom
JoAdo07:fix/ctx-search-singular-query

Conversation

@JoAdo07

@JoAdo07 JoAdo07 commented Sep 30, 2026

Copy link
Copy Markdown

Summary

The ctx_search handler has lifted singular query to [query] for a long time, but the tool schema never declared the field — so strict MCP hosts strip it before it arrives and the call fails with "Error: provide query or queries" (#1200). This adds the optional query string to buildCtxSearchInputSchema (both shared modes) documented as equivalent to queries: [query]; no handler change needed.

Test plan

  • vitest run tests/core/search-project-filter.test.ts — 22 passed (3 new Slice 7 cases: shape in both modes, parse preserves value, absent shapes stay absent).
  • tsc --noEmit — clean.

Closes #1200

Handler lifted query to [query] for a long time but schema never declared it, so strict hosts strip it and call fails. Fixes mksglu#1200.
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.

[Bug]: ctx_search rejects singular 'query' param despite schema declaring it valid

1 participant