Multi-layer codebase analysis MCP server with Gemini AI and progressive disclosure.
The server implements 7 tools with explicit registration and mostly complete schemas. However, there are significant quality gaps: (1) Parameter descriptions are missing or extremely sparse in the input schemas (e.g., 'focus' and 'exclude' in analyze_repo have minimal guidance on expected format or values). (2) Output schemas are completely undocumented, the tools return JSON text but the structure of that JSON is never specified. (3) Tool naming is somewhat generic ('analyze_repo', 'find_patterns') but acceptable. (4) Error handling is basic (try/catch with message wrapping) but lacks recovery guidance and categorization. (5) No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite all tools being READ_ONLY. (6) Descriptions are brief but mostly adequate (avg ~140 chars), though they lack specificity on dependency chains (e.g., 'expand_section requires analysisId from previous analyze_repo call' is mentioned but not tied to expected output format). The server demonstrates a functional baseline but falls short of production-grade quality due to missing parameter constraints, absent output documentation, and lack of error recovery guidance.
Perform a full architectural analysis of a repository with progressive disclosure. Returns expandable sections that can be drilled into with expand_section.
Expand a section from a previous analysis for more detail. Use after analyze_repo to drill into specific areas.
Detect architecture and design patterns in a codebase. Returns pattern matches with confidence levels and locations.
Discover available analysis types, supported languages, and cost estimates. Call this first to understand what analysis options are available.
Ask a question about a codebase and get an AI-powered answer with relevant file references. Uses cached analysis when available. Works best with GEMINI_API_KEY set, falls back to keyword matching without it.
Read specific files from a previously analyzed repository. Use the analysisId from analyze_repo to access files without re-cloning.
Output schemas are completely undocumented. Tools return JSON text but the structure of returned objects (fields, types, nesting) is never specified. LLMs cannot plan downstream operations or extract needed data without explicit schema documentation.
Parameter descriptions are missing or extremely minimal. 'focus' (array of specific areas) has no guidance on what constitutes a valid area. 'exclude' (glob patterns) lacks format examples. 'patternTypes' has no enumeration or examples. LLMs cannot construct valid input without explicit constraints.
No enum constraints on string parameters. 'depth' should be constrained to [surface, standard, deep] but is declared as free-form string type. 'source' accepts 'Local path or GitHub URL' but has no format validation or example. LLMs will hallucinate invalid values.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 53 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 0 | - | v1 |
Trace data flow through the codebase from an entry point. Useful for understanding how data moves through the system.
Error handling returns generic text without recovery guidance or error classification. A tool failure returns only the error message string with isError=true. Agents have no way to know if they should retry, ask the user, or give up.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). All 7 tools are READ_ONLY and could benefit from readOnlyHint=true to signal safety and idempotency to clients. Current implementation omits annotations entirely.
Parameter 'tokenBudget' in analyze_repo is numeric but has no min/max bounds documented. Agents could pass 0, negative, or absurdly large values. Specify range (e.g., 100 - 1000000) in both schema and description.
Response includes raw JSON text wrapped in a single 'text' content block. No structured response schema means LLMs must parse unstructured JSON strings, wasting tokens and increasing parse errors. Consider returning structured objects with typed fields.