Skip to content

list_wings/get_taxonomy truncated at 10,000 drawers (hardcoded limit) #723

@devtony42

Description

@devtony42

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

  1. Mine enough content to exceed 10,000 drawers
  2. Call mempalace_list_wings — only wings from the first 10K drawers appear
  3. 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).

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