Skip to main content
Glama

review_code

Submit code for review: bugs, security issues, silent failures, and style concerns. Give it files (path+content) and/or a unified diff. At least one of files or diff is required — submitting neither is rejected. TWO independent LLM-judge passes review it (a general correctness/security pass and a dedicated silent-failure pass) and their findings are merged into one verdict. For a genuinely useful review, ALSO supply conventions (paste this project's CLAUDE.md and RULES.md content — you already have repo access, this tool does not) so both passes can enforce project-specific rules, and relatedFiles (any existing file the change references but doesn't itself modify — an interface being implemented, a caller of a changed function, a sibling example of the real convention) so findings can be verified against actual code instead of guessed. Omitting both still works but produces a weaker review with no codebase grounding. No code generation or execution happens here — this is judgment only, not test verification (use test_component for that). Returns a reviewId immediately; call stream_review to follow progress and get the findings. Call get_usage_guide for detailed usage guidance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffNoA unified diff. The reviewer weights changed lines most heavily. Combined with files, must not exceed 150,000 characters.
filesNoFull file contents to review. Provide when you want the reviewer to see complete files, not just a diff.
contextNoOptional story/PR description to give the reviewer intent context.
conventionsNoThis project's CLAUDE.md and/or RULES.md content (or the relevant excerpt). Strongly recommended when available — both review passes treat this as authoritative: a finding that violates a stated rule here is always blocking.
relatedFilesNoExisting files for cross-reference ONLY — never diffed, never themselves the subject of a finding. Supply an interface the change implements, a caller of a changed function, or a sibling file showing the project's real convention, so the reviewer can verify claims against real code instead of guessing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations the description carries the full burden, and it does: it discloses the two-pass LLM-judge architecture, that findings are merged into one verdict, the rejection behavior when neither files nor diff is supplied, and the async contract (returns a reviewId immediately; call stream_review to follow progress). This is rich behavioral context beyond what any structured field provides.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and the hard constraint, and every section maps to a real decision an agent must make. It is somewhat verbose in the conventions/relatedFiles rationale, but the length is justified by a five-parameter tool with an async contract and no annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description explains the return (reviewId) and how to retrieve findings (stream_review), plus the input rejection rule and the guidance needed to get a strong review. An agent has everything required to call it correctly and follow up.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds genuine meaning beyond the schema: the mutual-requirement constraint that at least one of files or diff must be present (not visible since required is empty), the authoritative/blocking weight of conventions, and the intent behind relatedFiles as cross-reference-only grounding. It largely echoes the schema wording, which caps it below 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (submit) and resource (code for review) and enumerates the review scope: bugs, security issues, silent failures, style. It explicitly distinguishes itself from siblings by naming test_component for test verification, so an agent can route correctly without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use conditions (supply files and/or a diff, at least one required), when-not (no code generation or execution; use test_component for test verification), and detailed guidance on when to add conventions and relatedFiles versus the weaker review that results from omitting them. Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources