Skip to main content
Glama
n24q02m

better-code-review-graph

by n24q02m

Review

review
Read-onlyIdempotent

Generate review context for code changes by auto-detecting modified files and returning structural summaries, impacted nodes, source snippets, and review guidance. Compare commit diffs to audit refactors.

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

No arguments

Behavior4/5

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

Annotations declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, establishing safety. The description adds significant behavioral context: auto-detection of changed files, output structure (structural summary, impacted nodes, source snippets), and conditional behavior for 'show_line_shifts'. No contradictions with 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 efficiently structured: starts with the primary purpose, then lists actions and their parameters. It avoids redundancy and front-loads the most important information. A minor density of technical details is acceptable.

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, 100% schema coverage, and an output schema, the description covers the tool's behavior well. It explains both actions, parameter defaults, and key behaviors. The slight reliance on the 'help' tool for 'full docs' indicates a minor gap, but overall it is sufficiently complete.

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 the baseline is 3. The description adds value by grouping parameters under each action and providing examples (e.g., 'repo='repo_a-aaaaaaaa''), but it mostly reiterates schema descriptions. The grouping and context slightly elevate it from the baseline.

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' with two distinct actions: 'context' and 'delta'. It specifies verbs ('generate', 'auto-detects', 'returns') and the resource ('code review context'). While not explicitly distinguishing from siblings, the purpose is specific enough to make the tool's role clear against other tools like 'graph' or 'query'.

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 provides explicit guidance on when to use each action: 'context' for automatic git diff analysis and 'delta' for comparing two commits. It even details delta's 'show_line_shifts' option for refactor auditing. It lacks explicit 'when not to use' but offers clear context and refers to the 'help' tool for full documentation, which is reasonable.

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