Skip to main content
Glama

review_code

Fetch a branch or task's diff and stats against main so Claude can analyze code quality, bugs, and conflicts before review.

Instructions

Get the full diff and stats for a branch or task for code review. Returns the diff against main so Claude can analyze it for quality, bugs, and conflicts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchNoBranch name to review
task_idNoTask ID — will review all linked branches

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries more burden. It discloses that the diff is 'against main' and lists the review dimensions (quality, bugs, conflicts), which is helpful behavioral context. However, it doesn't state whether it's read-only (implied), what the output format is, or any limits like diff size. Adequate but incomplete for a data-returning tool.

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?

Two concise sentences that are front-loaded with the primary action and return value. No wasted words, though it could be slightly tighter.

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

Completeness3/5

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

The tool has no annotations, no output schema, and returns a complex artifact (a diff). The description explains the diff is against main, but omits whether the tool is read-only, how large diffs are handled, and what 'stats' includes. It's minimally viable but leaves gaps for a tool that returns unstructured data.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already fully documents both parameters. The description adds that 'task' reviews 'all linked branches', which is slightly more context than the schema's 'will review all linked branches', but it's essentially redundant. Baseline 3 for high schema coverage.

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

Purpose4/5

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

The description states a clear verb-and-resource ('Get the full diff and stats for a branch or task') and scopes it to code review. It's specific about what it returns, but doesn't distinguish itself from the closest sibling, compare_branches, which also deals with diffs.

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

Usage Guidelines3/5

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

The context 'for code review' implies when to use it, but there are no explicit when/when-not statements or alternatives named. An agent can infer it's for reviewing a branch's changes, but must guess how it differs from compare_branches or detect_conflicts.

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