Skip to main content
Glama

review_code

Review a pull request or diff to get severity-tagged, file:line-anchored findings on correctness, security, performance, maintainability, and tests.

Instructions

Review a pull request or diff. Returns a structured prompt that yields severity-tagged, file:line-anchored findings across correctness, security, performance, maintainability, and tests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prTitleNoPull request title.
languageNoPrimary language, e.g. 'Java', 'TypeScript'.
diffOrCodeYesUnified diff (preferred) or full source of the change under review.
focusAreasNoRestrict the review to these dimensions. Default: all dimensions.
prDescriptionNoPull request description / motivation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that the return is a structured prompt producing severity-tagged, file:line-anchored findings across five areas — a genuinely non-obvious behavioral trait. However, it says nothing about permissions, mutation/reversibility (a review tool is implicitly read-only but this is unstated), or any limits, leaving part of the safety profile undocumented.

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

Conciseness5/5

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

Two sentences, front-loaded with the action and followed by the return shape. Every clause earns its place with no filler.

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

Completeness4/5

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

There is no output schema, so the description correctly compensates by describing the return value (a structured prompt with severity-tagged findings), and all parameters are schema-documented. The only meaningful omission is when to choose this over the other review_* siblings.

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 description coverage is 100%, so all five parameters are already documented. The description's enumeration of review dimensions maps onto the focusAreas enum but adds no format or syntax detail beyond what the schema provides, so the baseline of 3 applies.

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 (review) and a precise resource (pull request or diff), and enumerates the dimensions it covers. This is cleanly distinguishable from siblings like review_architecture, review_cicd_pipeline, and review_infra_config, which target different artifacts.

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?

Usage is implied by the artifact named (a PR or diff), but there is no explicit when-to-use framing, no exclusions, and no routing to alternatives such as review_architecture or analyze_bug. An agent can infer intent but gets no decision guidance.

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