Skip to main content
Glama

Review context

review_context
Read-onlyIdempotent

Build a review briefing for a branch or PR: rank changed files by churn and breakage, flag missing companion changes, and suggest reviewers.

Instructions

Review briefing for the changes in base..head (e.g. a branch or pull request): the changed files ranked by how often they changed and broke on base, files that usually change together with them but were left out (a forgotten test, config or caller), and who knows the changed files best as suggested reviewers. Merge commits are excluded.

Input Schema

NameRequiredDescriptionDefault
baseYesTarget ref the changes would merge into, e.g. "main".
daysNoTime window in days.
headNoRef with the changes, e.g. a branch.HEAD
repoNoRepo name or path; defaults to the first configured repo.
limitNoMaximum number of results.
excludeNoGlobs to leave out, as in file_hotspots.
minDegreeNoMinimum coupling degree (percentage) for a missing companion.
minSharedNoMinimum shared commits for a missing companion.
halfLifeDaysNoFor reviewers: a commit counts half as much for every this many days of age.
maxFilesPerCommitNoSkip history commits touching more files than this (bulk renames, formatting).

Output Schema

NameRequiredDescriptionDefault
baseYes
headYes
repoYesName of the repository that was queried.
filesYesRiskiest first: most fixes, then most changes on base.
commitsYesNon-merge commits in base..head.
additionsYes
deletionsYes
reviewersYesWho knows the changed files best, excluding the change authors.
truncatedYesTrue if base..head has more commits than were read.
baseCommitYesFull hash that "base" resolved to.
headCommitYesFull hash that "head" resolved to.
windowDaysYesHow far back the history of base was read.
filesChangedYes
changeAuthorsYesAuthors of base..head, left out of reviewers.
scanTruncatedYes
historyScannedYesCommits on base read for history and ownership.
missingCompanionsYesFiles that usually change with the changed files but were left out.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered. The description adds genuine behavioral context beyond that: merge commits are excluded, base is the ranking reference ('changed and broke on base'), and the companion signal means forgotten tests/config/callers. It stops short of describing pagination or output ordering.

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?

A single front-loaded sentence that compacts three analytical facets plus an exclusion rule. It is dense but every clause earns its place; the length is justified by the composite nature of the tool.

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 composite analysis tool with an output schema, the description covers what the briefing contains and the one notable filtering rule (merge commits excluded). An agent has everything needed to decide to call it and interpret the result.

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% with rich per-parameter descriptions, so the schema carries the load. The description only loosely alludes to base/head semantics via 'base..head' and reviewer half-life concept, adding little beyond the structured fields. Baseline 3 is appropriate.

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 names a specific artifact ('Review briefing for the changes in base..head') and then enumerates its three concrete outputs: ranked changed files, missing co-change companions, and suggested reviewers. This is precise enough to distinguish it from the narrower point tools like file_hotspots or change_coupling even though it doesn't name them.

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?

It clearly frames the scenario ('e.g. a branch or pull request'), so an agent knows this is for pre-merge review of a diff range. It gives no explicit when-not or named alternative to pick instead, which keeps it below a 5.

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