You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #1046 restores projects that carry a ::missed shadow row, list_projects still performs expensive work for every database before returning:
opens every project database;
counts all nodes and edges;
resolves Git context for every root;
emits the entire result without pagination metadata.
On a cache with 500 valid project databases, one call took about 61.5 seconds. The response also grows linearly, which makes it easy for MCP clients or harnesses to truncate or reject it without a reliable total / has_more signal.
This is most noticeable in long-lived installations where the project cache grows over time.
Proposed solution
Add deterministic pagination to list_projects:
offset (default 0);
limit (bounded, for example default 50 / max 100);
What problem does this solve?
After #1046 restores projects that carry a
::missedshadow row,list_projectsstill performs expensive work for every database before returning:On a cache with 500 valid project databases, one call took about 61.5 seconds. The response also grows linearly, which makes it easy for MCP clients or harnesses to truncate or reject it without a reliable
total/has_moresignal.This is most noticeable in long-lived installations where the project cache grows over time.
Proposed solution
Add deterministic pagination to
list_projects:offset(default 0);limit(bounded, for example default 50 / max 100);total,returned,offset,limit,has_more;Return a compact entry by default (name + root path). Put node/edge counts, database size, and Git branch behind an explicit
include_detailsoption.A local prototype on the same 500-database cache reduced a compact 50-project page to about 0.4 seconds while reporting
total=500andhas_more=true.Alternatives considered
::missedfiltering in fix(mcp): ignore ::missed shadow rows when resolving a db's project name #1046: restores correctness, but still performs O(all projects) detail work and emits an unbounded response.Confirmations