Skip to main content
Glama

review_precommit

Run a final pre-commit sanity check that auto-captures staged git changes and returns blockers, warnings, and ready status to catch last-minute issues before committing.

Instructions

Final sanity check right before committing. Auto-captures staged git changes. Call this after git add and before git commit to catch last-minute issues. Returns ready_to_commit, blockers, warnings, responding models, and persistence provenance. An auto-captured check also returns captured_from: the absolute directory the bridge ran git in. If that is not the repository you are working in, pass the diff explicitly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoAbsolute path to the directory this review runs in — the repository or git worktree whose code is being reviewed. Auto-capture, repository instruction files, and the reviewer subprocess all use it. Always pass it: an auto-capturing review without it is refused unless the server is configured with "require_cwd": false, in which case the server's launch directory is used. Must be absolute; "~" is not expanded. Applies to this call only — pass it again on resume.
diffNoExplicit diff to review instead of auto-capture
modelNoOverride the configured default model for this call (e.g., "gpt-5.6-sol"), or "latest". Or pick a tier instead of a model id: "max" (hardest problems — architecture, concurrency, security, subtle bugs), "balanced" (everyday review), or "fast" (small diffs, precommit sanity, quick iteration). Tiers map per provider (Codex: gpt-6-astra / gpt-5.6-sol / gpt-5.6-luna; Gemini: 3.1 Pro (High) / 3.8 Flash (High) / 3.8 Flash (Medium)) and survive failover. May be combined with session_id to change model mid-session; without it a resumed session keeps the model it was recorded with. Compare returned resolved and observed labels for runtime changes.
auto_diffNoAuto-capture staged git changes. Omit to use the project config default (review_standards.precommit.auto_diff).
checklistNoCustom pre-commit checks
session_idNoContinue from previous review

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose key behavior: auto-capture, returned fields, captured_from behavior, and the diff fallback. It doesn't detail side effects or error conditions, but the main operational traits are visible.

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?

The opening phrase is immediate, and every subsequent sentence adds either sequencing, return information, or a correction path. No filler or redundant restatement.

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?

Since there is no output schema, listing the returned fields is valuable and mostly sufficient. A few terms (e.g., 'persistence provenance', 'responding models') are left unexplained, but the description covers how and when to call the tool.

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?

Schema coverage is 100%, so all parameters are documented. The description adds extra meaning by linking cwd and diff: when auto-capture uses the wrong directory, the caller must supply the diff explicitly.

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 identifies a distinct operation: a final sanity check before commit that auto-captures staged git changes. This clearly separates it from the review_plan/review_code/review_history/review_status siblings.

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 gives explicit sequencing ('Call this after git add and before git commit') and a conditional rule (pass the diff explicitly if the auto-captured directory is not the working repo). It does not enumerate exclusions or alternatives, but the context is clear.

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