Problem
codedb_remote actions that return list-shaped data routinely exceed the MCP tool-result size limit and force callers to dump-to-file + jq. Reproductions from a fresh exercise of the tool:
| call |
size |
action=tree, repo=justrach/merjs (codegraff) |
65 KB |
action=tree, repo=anthropics/anthropic-sdk-python, backend=wiki |
109 KB |
action=commits, repo=anthropics/anthropic-sdk-python, backend=wiki |
118 KB |
Each of these blows past the per-tool-result token cap, so the agent can't read the response inline — it has to fork a subagent or pipe to jq. The repos involved aren't unusual (~4 MB index sizes).
Proposal
Accept query params:
tree: ?prefix=src/, ?limit=N, ?offset=N, ?expand=true|false
commits: ?since=<ISO|sha>, ?limit=N
dep-history: ?since=<ISO|sha>, ?limit=N
Default behavior should stay backwards-compatible — only slice the response when a param is provided. The MCP client (handleRemote in src/mcp.zig) should accept these params and forward them through.
Why
This is the single biggest usability pothole in the tool today. A 30-min server-side fix in codedb-cloud unlocks routine large-repo exploration.
Problem
codedb_remoteactions that return list-shaped data routinely exceed the MCP tool-result size limit and force callers to dump-to-file + jq. Reproductions from a fresh exercise of the tool:action=tree, repo=justrach/merjs(codegraff)action=tree, repo=anthropics/anthropic-sdk-python, backend=wikiaction=commits, repo=anthropics/anthropic-sdk-python, backend=wikiEach of these blows past the per-tool-result token cap, so the agent can't read the response inline — it has to fork a subagent or pipe to
jq. The repos involved aren't unusual (~4 MB index sizes).Proposal
Accept query params:
tree:?prefix=src/,?limit=N,?offset=N,?expand=true|falsecommits:?since=<ISO|sha>,?limit=Ndep-history:?since=<ISO|sha>,?limit=NDefault behavior should stay backwards-compatible — only slice the response when a param is provided. The MCP client (
handleRemoteinsrc/mcp.zig) should accept these params and forward them through.Why
This is the single biggest usability pothole in the tool today. A 30-min server-side fix in codedb-cloud unlocks routine large-repo exploration.