Skip to main content
Glama

Review

review
Read-onlyIdempotent

Generate token-efficient review context for code changes. Provides structural summary, impacted nodes, source snippets, and review guidance for git diffs, or delta comparison between commits.

Instructions

Generate token-efficient review context for code changes. Actions: context (default — auto-detects changed files from git diff, returns structural summary, impacted nodes, source snippets, and review guidance), delta (from_sha, to_sha — wraps the query.diff buckets and, when show_line_shifts=true, surfaces qualified_names whose line_start moved between the two commits for refactor auditing). Context params: changed_files (auto), max_depth=2, include_source=true, max_lines_per_file=200, base='HEAD~1', repo_root (auto). Delta params: from_sha, to_sha, show_line_shifts=false, repo, repo_root. Use help tool for full docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNo``context`` action — git ref for change detection (default: ``HEAD~1``).HEAD~1
repoNoPhase 2 Task 10 — when non-empty, scope to nodes whose ``repo_id`` matches (e.g. ``repo='repo_a-aaaaaaaa'``). Default ``""`` includes every federated repo. Both actions.
actionNo``context`` (default) or ``delta``.context
to_shaNo``delta`` action — later commit SHA. Required.
from_shaNo``delta`` action — earlier commit SHA. Required.
languagesNo``context`` action — optional list of language names (e.g. ``["python"]``) to scope the ``untested_functions`` list. Excludes functions whose language doesn't match. Fixes false positives on cross-language repos (D16, fixes #340).
max_depthNo``context`` action — impact radius depth (default: 2).
repo_rootNoRepository root path (auto-detected). Both actions.
changed_filesNo``context`` action — files to review (auto-detected from git if omitted).
include_sourceNo``context`` action — include source code snippets (default: true).
show_line_shiftsNo``delta`` action — when True, include nodes whose ``line_start`` moved between ``from_sha`` and ``to_sha`` in the response (default False).
max_lines_per_fileNo``context`` action — max source lines per file (default: 200).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations declare readOnlyHint, idempotentHint, and non-destructive behavior, which the description supports by stating it generates review context without modification. The description adds useful operational details like auto-detection of changed files and default parameter values, enhancing transparency beyond the annotations.

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?

The description is front-loaded with the main purpose and actions, then parameter groups. It uses a structured list format (though plain text) that is easy to scan. Could be slightly shorter, but every sentence earns its place.

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?

Given 12 parameters, full schema coverage, and an output schema (indicated but not shown), the description covers both actions, explains parameter defaults and behaviors, and outlines the output components (structural summary, impacted nodes, etc.). It adequately prepares the agent for invocation.

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?

While schema coverage is 100%, the description groups parameters by action ('Context params' vs 'Delta params') and explains the role of each in context, such as the effect of 'show_line_shifts' and the auto-detection of 'changed_files'. This adds meaning beyond individual schema descriptions.

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?

The description clearly states the tool generates token-efficient review context for code changes, specifying two distinct actions ('context' and 'delta') with their exact behaviors. It distinguishes the tool from siblings like 'query' or 'graph' by focusing on code review with auto-detection of changed files.

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

Usage Guidelines4/5

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

The description explains when to use each action (default 'context' for auto-detection, 'delta' for specific commit comparisons) and references the 'help' tool for full documentation. It does not explicitly exclude use cases or compare with sibling tools, but the guidance is clear within the tool itself.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/n24q02m/better-code-review-graph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server