MCP server exposing RepoDigest's AST signatures, call graph, and token-budgeted context packing
Three well-named, verb-prefixed tools with complete input schemas and clear descriptions. All parameters are typed and documented. Tool annotations (read_only_hint) are correctly applied. Output schemas are documented in docstrings. However, descriptions lack LLM-optimized guidance on WHEN to use each tool vs. alternatives, and error handling lacks recovery hints. pack_task_context has a subtle validation issue (budget < 1 check happens after load_index, not before). No per-tool output schema formalization in the registration.
List a symbol's direct callers and callees across the repository. Edges are matched by simple name (no import or type resolution), so common names such as `get` or `run` can produce false positives. Class instantiation `Foo()` links to the class `Foo`, not to `Foo.__init__`.
Return a Python symbol's signature and docstring without its body. Far cheaper than reading the file. Works for functions, classes (methods listed as signatures) and methods.
Pack the code most relevant to a task into a token-bounded XML snippet. Ranks every symbol against `query` (BM25), takes the best match as the root, then breadth-first expands through its callees and callers, skipping (never truncating) any symbol that no longer fits.
Descriptions lack WHEN-to-use guidance. 'Return a Python symbol's signature' tells WHAT but not WHEN to prefer this over reading the file or calling get_symbol_dependencies. LLMs need explicit selection hints.
Error messages lack recovery guidance. ProjectError exceptions are surfaced as ToolError but do not suggest next steps (e.g., 'Unknown symbol. Try pack_task_context with a natural-language query to find related code.').
pack_task_context validates budget AFTER loading the index (expensive operation). Should validate budget < 1 before any I/O to fail fast.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | <=2025-11-25 | v2 |
Output schemas are documented in docstrings but not formalized in tool registration. Clients cannot introspect return types. get_symbol_dependencies returns a dict with 'symbol', 'kind', 'file', 'callers', 'callees', this should be declared in the tool schema.
No pagination or result limits documented. pack_task_context returns XML that could be very large if budget is high. Should document max output size and offer streaming or chunking for large results.