Skip to main content
Glama

codex_review

Run Codex CLI code reviews on a local repository, defaulting to read-only and checking uncommitted changes, base branches, commits, or custom prompts.

Instructions

Run a code review with Codex CLI (codex exec review), read-only by default (accepts sandbox override). Defaults: sandbox="read-only", model=(inherited from ~/.codex/config.toml), reasoning_effort=(inherited from ~/.codex/config.toml), wait_seconds=300. When model is specified (or CODEX_DEFAULT_MODEL is set), it also sets Codex's review_model override. If no review target (uncommitted/base/commit/prompt) is provided, defaults to uncommitted changes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cwd": "<cwd>"
    },
    "name": "codex_review"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYesAbsolute path of the repository directory to review.
baseNoReview changes against a base branch (--base).
modelNoOptional model / review_model override. Omit to inherit ~/.codex/config.toml.
titleNoOptional title displayed in the review summary (--title).
commitNoReview changes introduced by a specific commit SHA (--commit).
promptNoOptional custom review instructions.
sandboxNoDefaults to "read-only" (accepts writable overrides if requested).
worktreeNoNot supported for review mode by Codex CLI.
uncommittedNoReview staged, unstaged, and untracked changes (--uncommitted).
wait_secondsNoSeconds to wait synchronously. Default: 300.
reasoning_effortNoOptional reasoning effort override. Omit to inherit ~/.codex/config.toml.
skip_git_repo_checkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does substantial work: it declares the read-only default, notes that a writable sandbox override is accepted, lists inherited defaults for model and reasoning_effort, and discloses the non-obvious side effect that specifying a model also sets Codex's review_model override. It is silent on blocking/timeout behavior (e.g., what happens after wait_seconds elapses) and on permissions, which keeps it below 5.

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 core action and its defaults, and each sentence conveys operational information. There is minor redundancy between 'read-only by default' in the first sentence and 'Defaults: sandbox="read-only"' in the second, which is the only real waste.

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

Completeness3/5

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

For a 12-parameter tool with no annotations and no output schema, the description covers invocation defaults and target selection well, but says nothing about what a completed review returns or how the agent should interpret a timeout at wait_seconds=300. Those are the gaps that matter most for an agent deciding how to call and follow up.

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 description coverage is 92%, so the baseline is 3; the description earns above that by explaining the model parameter's side effect on review_model (not stated in the schema) and by clarifying the precedence/fallback among the target parameters. It does not add meaning for skip_git_repo_check, title, or worktree, but the schema already documents most of those.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource — 'Run a code review with Codex CLI (`codex exec review`)' — which is concrete enough to separate it from codex_run, codex_status, codex_wait, and codex_steer. It never explicitly contrasts itself with those siblings, so it stops short of a 5.

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?

It gives a useful selection rule for the target parameters: if no review target (uncommitted/base/commit/prompt) is supplied, it falls back to uncommitted changes. It does not say when to prefer this over codex_run or when a review is inappropriate, so guidance is implied rather than explicit.

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