Skip to content

BUG: Status/taxonomy MCP tools silently truncate at 10,000 drawers — wrong counts for large palaces #478

@jphein

Description

@jphein

Summary

tool_status, tool_list_wings, tool_list_rooms, and tool_get_taxonomy in mcp_server.py all call col.get(include=["metadatas"], limit=10000) and return results based on that subset.

For palaces with more than 10,000 drawers (e.g., mining 25K files at ~5 chunks each = 125K drawers), these tools silently return incorrect wing/room counts with no warning that results are truncated.

The Fix Exists in the Codebase

palace_graph.py:49-51 correctly paginates in batches of 1,000 with an offset loop:

while True:
    batch = col.get(limit=1000, offset=offset, include=["metadatas"])
    ...

This same pattern should be applied to all four MCP tools and the miner.status() function (line 626).

Impact

Any palace with >10K drawers gets wrong mempalace status output and wrong MCP taxonomy responses. This directly affects search filtering quality since the AI sees incomplete wing/room lists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mcpMCP server and toolsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions