fix(mcp): expose tag_groups parameter on recall tool#1424
Merged
nicoloboschi merged 1 commit intomainfrom May 4, 2026
Merged
Conversation
The MCP recall tool's schema omitted tag_groups, so MCP clients passing
e.g. {"not": {"tags": ["closeout"]}} for negative filtering had it
silently dropped — recall executed without the filter. The REST API
already exposed it; this brings the MCP tool in line.
Validates incoming dicts via TypeAdapter(list[TagGroup]) and enforces
the same tags/tag_groups mutual-exclusivity check as RecallRequest.
liling
pushed a commit
to liling/hindsight
that referenced
this pull request
May 5, 2026
…) (vectorize-io#1424) The MCP recall tool's schema omitted tag_groups, so MCP clients passing e.g. {"not": {"tags": ["closeout"]}} for negative filtering had it silently dropped — recall executed without the filter. The REST API already exposed it; this brings the MCP tool in line. Validates incoming dicts via TypeAdapter(list[TagGroup]) and enforces the same tags/tag_groups mutual-exclusivity check as RecallRequest.
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
tag_groupsto the MCPrecalltool schema (both multi-bank and single-bank variants), bringing it in line with the REST API'sRecallRequest.TypeAdapter(list[TagGroup])and enforces the sametags/tag_groupsmutual-exclusivity rule as the REST endpoint.Why
The engine and REST API already supported
tag_groups, but the MCP tool's signature omitted it — so MCP clients passing e.g.[{"not": {"tags": ["closeout"], "match": "any_strict"}}]for negative filtering had the parameter silently dropped, and recall executed unfiltered. This was caught by a PM bootstrap skill that got 7/50 closeout-tagged results leaking through via MCP while the same filter worked over REST.Test plan
uv run pytest tests/test_mcp_tools.py— 172 passed (4 new tests)./scripts/hooks/lint.shcleanuv run ty check hindsight_api/mcp_tools.pyclean