Skip to main content
Glama

Read what a worker changed

get_worker_diff

Retrieve a worker's actual Git changes against its base, including uncommitted edits, as a file list or paged patch before landing.

Instructions

The worker's actual changes against its base, committed or not. Without file: the list of files with line counts and hunk counts. With file: that file's patch, paged by hunk (cursor from the previous page). Read this before landing; it is what the worker did, whatever it reported.

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": "get_worker_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNo
hunkNoStart at this hunk of the file
pathsNoLimit the diff to these paths
cursorNo
task_idYes
max_charsNoWith no file: return every patch in one reply, capped at this size
page_sizeNoHunks per page

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A4/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 load and does well: it discloses that uncommitted work is included, that the result is authoritative over the worker's own claims, and that patch reads are paged via a cursor from the previous page. It omits read-only confirmation, truncation behavior when max_chars applies, and any error/pagination-termination semantics.

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?

Three dense sentences, front-loaded with what the data is, then the two modes, then the reason to call it. Nothing is redundant and no sentence could be dropped without losing information.

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?

For a 7-parameter read tool with no annotations and no output schema, the description explains what comes back in both modes (file list with counts, a patch page) and how paging works, which is the essential shape. It falls short on the auxiliary filtering/limit parameters and on what happens at the end of paging or when output is capped.

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 57%, so the description needs to compensate and only partly does: it explains the presence/absence of `file`, the meaning of `cursor`, and implicitly the `hunk` paging, which covers the core read path. It says nothing about `paths`, `max_chars`, `page_size`, or why `task_id` is required, leaving roughly half the parameters to the schema alone.

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 names the resource precisely ("the worker's actual changes against its base, committed or not") and splits the tool into two distinct output modes, list-of-files vs single-file patch. It distinguishes itself from the worker's self-report ("whatever it reported") but never names a sibling tool, so the differentiation is implied rather than explicit.

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?

"Read this before landing" gives a clear trigger condition and implicitly positions the tool against land_worker. However, it offers no when-not guidance, no prerequisites, and does not explicitly say whether to prefer this over get_worker for status questions.

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