Skip to content

fix(mcp): let the recall tool return source chunks, entities and source facts - #5678

Merged
nicoloboschi merged 1 commit into
mainfrom
fix/mcp-recall-include-options
Oct 16, 2026
Merged

nicoloboschi merged 1 commit into
mainfrom
fix/mcp-recall-include-options

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

Closes #5470.

The MCP recall tool 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 with include.chunks found them.

Change

Both MCP recall variants (with and without bank_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_chunks is 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.
  • MCP docs table updated.

…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.
@nicoloboschi
nicoloboschi merged commit c4c572c into main Oct 16, 2026
117 checks passed
@nicoloboschi
nicoloboschi deleted the fix/mcp-recall-include-options branch October 16, 2026 14:01
@nicoloboschi nicoloboschi mentioned this pull request Nov 3, 2026
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.

MCP recall tool cannot return source chunks; bank recall_include_chunks has no effect on recall

1 participant