Skip to main content
Glama

Review code

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "review_code"
  }
}

Input 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?

Annotations only say readOnlyHint=false and destructiveHint=false, so the description carries real weight and does: two independent LLM-judge passes, merged verdict, immediate reviewId return with async progress via stream_review, and an explicit no-execution/no-verification boundary. It also discloses the quality tradeoff of omitting optional inputs ('Omitting both still works but produces a weaker review').

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 requirements before the optional-input guidance, and nearly every sentence carries information. It is somewhat dense and ends with a meta pointer ('Call get_usage_guide for detailed usage guidance') that could be trimmed, but nothing is genuinely wasted.

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?

For a submission tool with no output schema, it covers the full lifecycle: inputs and minimum requirement, optional grounding inputs, return value (reviewId), and the follow-up call needed to retrieve findings. An agent has everything required to invoke it correctly and handle the result.

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 goes beyond it by explaining the intent behind conventions (both passes treat it as authoritative, violations are always blocking) and relatedFiles (never diffed, never a finding subject, used for cross-reference). It adds rationale the schema does not, though the 150k combined limit is only in the schema.

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 and resource ('Submit code for review: bugs, security issues, silent failures, and style concerns') and names exactly what it is not ('No code generation or execution happens here... use test_component for that'). The two-pass judge model further distinguishes it from any sibling.

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?

Explicit about input requirements ('At least one of files or diff is required — submitting neither is rejected'), about when to add conventions and relatedFiles and what those should contain, and about the correct downstream flow ('call stream_review to follow progress'). It also routes test verification to test_component.

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