Gemini-powered MCP server for automated code review, analysis, and documentation.
Code Lens presents a moderately structured tool set with explicit parameter contracts defined in tool-contracts.ts. However, critical gaps emerge: (1) Tool descriptions are present but many lack specificity about WHEN to use them vs. similar tools, e.g., analyze_pr_impact, generate_review_summary, and detect_api_breaking_changes all address code changes but their distinctions are unclear. (2) Parameter constraints are documented as strings (e.g., '2-32 chars') rather than enforced in JSON Schema, forcing LLMs to interpret text constraints. (3) Output schemas are named ('outputShape: string') but never defined, LLMs cannot see the actual structure of response objects. (4) Error handling is mentioned in gotchas but lacks recovery guidance ('what should the LLM do if this fails?'). (5) The tool naming is largely sound (verb-driven: generate_, analyze_, detect_, load_, ask_, refactor_) but some compound concerns: generate_review_summary couples impact assessment + risk rating + merge recommendation into one tool rather than three focused tools. (6) Cross-tool dependencies (requiresDiff, requiresFile) are declared but validation logic is not visible in provided source, creating risk of runtime failures that LLMs cannot anticipate.
Assess severity, categories, breaking changes, and rollback complexity.
Analyze Big-O complexity and detect degradations in changed code.
Ask a question about the loaded file.
Detect breaking API/interface changes in a diff.
Detect code smells and anti-patterns in the loaded file using Fowler taxonomy.
Explain an error and suggest fixes.
Generate a diff of current changes and cache it server-side. MUST be called before any other tool. Uses git to capture unstaged or staged changes in the current working directory.
Output schemas are declared as string names (outputShape: string) but never defined. LLMs cannot see the actual structure of response objects, preventing downstream tool chaining and forcing agents to parse unstructured text.
Parameter constraints are expressed as human-readable strings (e.g., 'constraints: "2-32 chars"') rather than enforced in JSON Schema (minLength, maxLength, pattern, enum). LLMs interpret text constraints inconsistently and cannot validate before calling.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | 2025-06-18+ | v2 |
| 2026-03-09 | F | 32 | - | v1 |
Generate JSDoc/TSDoc/docstring stubs for public exports in the loaded file.
Produce PR summary, risk rating, and merge recommendation.
Generate prioritized test cases and coverage guidance.
Load and cache a file from the workspace for analysis by other tools.
Generate refactoring suggestions for the loaded file.
Search the codebase for files matching a query.
Validate algorithms and logic in the loaded file using Gemini code execution sandbox.
Tool descriptions lack differentiation guidance. analyze_pr_impact ('Assess severity, categories, breaking changes, and rollback complexity'), generate_review_summary ('Produce PR summary, risk rating, and merge recommendation'), and detect_api_breaking_changes ('Detect breaking API/interface changes') address overlapping concerns. LLMs cannot determine which to call for a given code review task.
generate_review_summary combines three concerns (summary + risk rating + merge recommendation) into one tool. Should be split into focused, single-responsibility tools (generate_pr_summary, assess_pr_risk, recommend_merge_action) for composability.
Cross-tool dependencies (requiresDiff: true, requiresFile: true) are declared in contracts but validation logic is not visible in provided source. No error messages guide LLMs if they call tools out of order (e.g., ask_about_code before load_file).
Task support is declared in ToolContract (taskSupport: 'optional'|'required'|'forbidden') but contracts show all tools with taskSupport='optional'. No visibility into which tools support background execution (Tasks extension). MCP SDK does not yet expose execution field in tools/list response.
Parameter 'maxTestCases' in generate_test_plan and 'maxSuggestions' in refactor_code use numeric constraints as strings ('1-30', '1-15') rather than JSON Schema (minimum, maximum). LLMs may pass out-of-range values; no client-side validation is visible.