Skip to main content
Glama

get_commit_diff

Read the raw diff between a base and head revision, optionally limited to a file path, and paginate large outputs by offset to retrieve complete changes.

Instructions

Read the raw diff from base to head, optionally restricted to a file.

Follows git diff base head semantics. A large response is clipped explicitly;
pass next_offset to read the next chunk with the same revisions/path. Pin
revisions to hashes when chunking so moving branches cannot change the diff.
max_chars is clamped to 1-100000. Bitbucket may reject oversized diffs (555);
narrow with path in that case. Binary differences may have no text patch.

Input Schema

NameRequiredDescriptionDefault
baseYes
headYes
pathNo
offsetNo
max_charsNo
repo_slugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/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 a good job: it discloses explicit clipping of large responses, the 555 rejection from Bitbucket, the max_chars clamp range (1-100000), the possibility of a binary diff having no text patch, and the consistency hazard of chunking against moving branches. It omits auth/permission requirements and how the agent knows chunking has ended (empty next chunk?), 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first clause, followed by short, independently useful operational notes with zero filler. Every sentence (clipping, chunking, hashing, clamping, 555, binary) carries distinct information an agent would otherwise have to discover by trial.

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?

No output schema and no annotations means the description must stand alone, and it covers the risky edges (clipping, oversized-diff errors, binary files, revision drift). What's missing is the shape of a successful return (raw patch text? headers?) and an explicit end-of-chunking signal, which matter for a tool designed to be called repeatedly.

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 0%, so the description must compensate, and it partially does: base/head are framed as git revisions, path narrows the diff, max_chars has a stated clamp. But it refers to the chunking parameter as "next_offset" while the schema names it "offset" — an agent could look for a nonexistent parameter — and repo_slug is never explained. Useful but not fully reliable coverage.

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 opens with a specific verb and resource: "Read the raw diff from base to head, optionally restricted to a file." An agent immediately knows this returns diff content between two revisions. It does not distinguish itself from close siblings like compare_commits or get_pr_diff, which also return revision-to-revision differences, 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?

Operational guidance is present for the hard cases: chunk large diffs with the offset, pin revisions to hashes so moving branches don't change results, narrow with path if Bitbucket returns 555. However, there is no guidance on when to choose this tool over compare_commits or get_pr_diff, which is the selection decision an agent actually has to make. Usage is implied by mechanics rather than by explicit alternatives.

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