Skip to main content
Glama

get_diff

Retrieve the unified diff for a staged write operation, enabling review of pending changes before application.

Instructions

Show the unified diff for a staged write op.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
op_idYes
include_contentNoAlso return the full new file content (for applying via your own edit tools in propose mode)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations provided, the description carries the full behavioral burden. 'Show' implies a read-only operation, but it says nothing about behavior when op_id is invalid, whether output is paginated, or whether viewing has any side effects, leaving a mutation/read gap unresolved.

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 with zero filler, which is efficient and easy to parse. It borders on under-specification rather than true concision, but structurally it is clean.

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

Completeness2/5

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

With no output schema and no annotations, the description needs to do more work: it does not describe the diff's return format, the meaning of op_id, or what include_content yields beyond the schema's own hint. For a 2-parameter tool with a 50% documentation gap, this is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50%: include_content is documented in the schema, but the required op_id has no description anywhere. The phrase 'for a staged write op' only faintly hints that op_id identifies that op, so the description fails to compensate for the documentation gap on the mandatory parameter.

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 and resource ('Show the unified diff') scoped to 'a staged write op', so the agent knows exactly what it returns. It does not, however, differentiate itself from siblings like verify_staged or list_staged, which an agent could confuse with this read.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance, and no alternative tool is named despite closely related siblings (verify_staged, list_staged, get_job). The 'for a staged write op' phrase only weakly implies the context; the agent must infer selection criteria on its own.

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