Bug
tool_list_wings(), tool_list_rooms(), and tool_get_taxonomy() in mcp_server.py use col.get(include=["metadatas"], limit=10000). When the palace exceeds 10,000 drawers, wings/rooms beyond the first 10K are invisible in listings.
Search works correctly since col.query() searches the full index.
Reproduction
- Mine enough content to exceed 10,000 drawers
- Call
mempalace_list_wings — only wings from the first 10K drawers appear
- Call
mempalace_search with a wing filter for a missing wing — results found correctly
Environment
- MemPalace 3.1.0
- ChromaDB 0.6.3
- 27,714 drawers across 47 wings
Suggested Fix
Replace the hardcoded limit=10000 with col.count():
total = col.count()
all_meta = col.get(include=["metadatas"], limit=max(total, 10000))["metadatas"]
This ensures all drawers are scanned for listing operations regardless of palace size.
Affects: mcp_server.py lines ~205, ~220, ~238 (three occurrences).
Bug
tool_list_wings(),tool_list_rooms(), andtool_get_taxonomy()inmcp_server.pyusecol.get(include=["metadatas"], limit=10000). When the palace exceeds 10,000 drawers, wings/rooms beyond the first 10K are invisible in listings.Search works correctly since
col.query()searches the full index.Reproduction
mempalace_list_wings— only wings from the first 10K drawers appearmempalace_searchwith a wing filter for a missing wing — results found correctlyEnvironment
Suggested Fix
Replace the hardcoded
limit=10000withcol.count():This ensures all drawers are scanned for listing operations regardless of palace size.
Affects:
mcp_server.pylines ~205, ~220, ~238 (three occurrences).