feat(codedb-pro): lookup one-shots; compact tools/list - #603
Draft
justrach wants to merge 6 commits into
Draft
Conversation
Advertise explain/context/callpath/list_dir/status on the paid suite and classify those MCP names in the harness. Native codedb is a different job (the free index) and is neither blocked nor redirected when codedb-pro is licensed — only read_file and leading shell searches go to the paid tools (ADR 0020).
Steer licensed sessions at mcp__codedbpro__lookup (cached composed answer) instead of hop chains. Native codedb stays the free index.
replacementFor now leads with lookup but still names the hop tools so the existing pointer test and the model both see a concrete fallback.
Four tier-2 cases lock the RPC count: native around is 1 call, the symbol+callers hop is 2, pro lookup is 1, the old pro hop path is 3. scripts/eval-codedb-surface.py times the codedb CLI on this repo and prints those harness numbers together.
Extend ADR 0020 so a licensed session does not hop read/search after lookup: file path resolves to outline, pattern to search hits. Normalize lookup's file argument against the session cwd.
Advertise routing keys without titles, annotations, or unused read modes. Handlers still accept extra properties. Graff already defers the server; other hosts pay the catalog every turn.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Licensed codedb-pro sessions keep native
codedb(free index) and addmcp__codedbpro__lookupas the one-RPC paid entry.Lookup routes:
name→ explaintask/query→ contextfrom+to→ callpathpattern/ regex-shaped query → search hitsNamed one-shots stay dispatchable. Only
read_fileand leading shell search redirect to the paid suite.The paid suite's advertised
tools/listis now compact (routing keys, no titles/annotations;readenum isfull/outline/symbol/lines). Handlers still accept extra fields. Graff already defers the whole server behindload_tool_schemas— this cut is for hosts that embed the catalog every turn.Mini catalog: 1438 bytes (was ~3116).
Why
Hop chains cost 2–5 MCP round-trips for questions codedb already answers in one call. Schema bytes are a separate tax: count was already 4 tools; Claude/Cursor still paid the JSON every turn.
Suite
Companion: https://github.com/justrach/zigrepper/pull/155