Skip to main content
Glama

get_diff

Retrieve the Git diff for a task workspace or repository, covering committed changes since the task base SHA and untracked files, to review code modifications.

Instructions

Returns the Git diff for a task workspace or configured repository (including committed changes since task base SHA and untracked files)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stagedNoCheck staged changes (default false)
task_idNoTask ID (queries task workspace)
max_bytesNoMax bytes for diff output (default 100000)
repositoryNoRepository alias (queries repository root)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure. It does add useful context by stating the diff includes committed changes since the task base SHA and untracked files. However, it does not mention that the operation is read-only, how max_bytes truncation behaves, or what happens if both task_id and repository are supplied. These are meaningful behavioral gaps for a tool with no annotation safety hints.

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 description is a single, focused sentence that front-loads the primary action and resource, then adds the key scoping detail about committed changes and untracked files. There is no redundancy or irrelevant information.

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?

The description covers the high-level purpose and diff scope well, and the schema documents all parameters. However, there is no output schema and no annotations, so the agent is left without explicit guidance on return format, truncation behavior, error cases, or interaction between task_id and repository. This is adequate but not fully complete for a tool with four optional parameters.

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 description coverage is 100%, so the baseline is 3. The description adds a little value by clarifying that the diff can come from a task workspace or a configured repository, which maps to task_id and repository. It does not elaborate on staged or max_bytes beyond what the schema already provides, which is acceptable given full schema coverage.

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 clearly states the tool returns a Git diff for either a task workspace or a configured repository, and it specifies the diff scope (committed changes since task base SHA and untracked files). This is specific enough to distinguish it from siblings like get_repo_status, which presumably returns status rather than diff content.

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 description implies when to use this tool: when you need the actual Git diff for a workspace or repository. However, it does not explicitly contrast it with get_repo_status or other siblings, nor does it explain when one should prefer this over alternatives. The 'or configured repository' phrasing hints at mutually exclusive modes but does not explicitly state precedence or conflict behavior.

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