Skip to main content
Glama

codex_diff

Read-onlyIdempotent

Fetch the current turn's diff and reported file changes for a task ID, excluding older diffs and without running Git hooks or shell commands.

Instructions

Retrieve the current native turn's diff and reported file changes; old diffs are not carried into new turns. Does not invoke Git hooks or execute a shell.

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": {
      "task_id": "<task_id>"
    },
    "name": "codex_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
task_idYesTask id

Output Schema

NameRequiredDescriptionDefault
okYes
result_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive semantics, so the description's real contribution is the side-effect disclosure: 'Does not invoke Git hooks or execute a shell', plus the retention rule that old diffs are dropped across turns. That is genuinely additive behavioral context an agent cannot get from the annotations, though nothing is said about size, truncation, or error cases when no diff exists.

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?

Two tight clauses, front-loaded with the core action and followed by the scope/side-effect caveats; no filler. The semicolon-joined phrasing and jargon like 'native turn' are slightly dense but still parseable.

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?

With an output schema present, return-value explanation is unnecessary, and annotations cover the safety profile. The description supplies scope (current turn only) and non-side-effects (no hooks, no shell), leaving only minor gaps such as behavior when no changes exist.

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?

There is a single required parameter (task_id) with 100% schema description coverage, so the schema already carries the burden. The description adds no information about task_id's scope or format, which fits the baseline 3 for a fully documented single-parameter schema.

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 gives a specific verb ('Retrieve') and precise resource ('the current native turn's diff and reported file changes'), which is more than a restatement of the name. It does not name a sibling alternative, though no obvious diff-sibling appears in the catalog, so differentiation is only partially addressed.

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?

'the current native turn's' plus 'old diffs are not carried into new turns' implicitly tells the agent this is for the active turn only, which is a useful scoping cue. However, there is no explicit when-to-use statement, no prerequisites, and no named alternative for retrieving historical diffs.

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