Repository navigation
fix(mcp): let the recall tool return source chunks, entities and source facts - #5678
Merged
Merged
Conversation
…ce facts (#5470) The MCP recall tool never passed include_chunks / include_entities / include_source_facts to recall, so MCP clients only ever saw extracted facts and lost exact strings (paths, IDs, commands) that live only in the source text. Both recall tool variants now take the six include options REST recall already supports. All default off, so existing MCP answers keep their size.
This was referenced Oct 20, 2026
Merged
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.
Closes #5470.
The MCP
recalltool never asked recall for source chunks, entities or source facts, so MCP clients only saw extracted facts. Exact strings (IP:port, paths, GUIDs, commands) that extraction rewords were lost, while REST recall withinclude.chunksfound them.Change
Both MCP
recallvariants (with and withoutbank_id) now take the options REST recall already has, and pass them through:include_chunks/max_chunk_tokens(8192)include_entities/max_entity_tokens(500)include_source_facts/max_source_facts_tokens(4096)All default off, so existing MCP answers keep their size.
The bank setting
recall_include_chunksis left alone: it controls the recall that reflect / mental-model refresh runs internally, not the recall endpoint or tool.Tests
test_mcp_tools.py: options are off by default, and passed through in both tool variants.