Skip to main content
Glama

getDiffBetweenRefs

Read-only

Compare two Git refs to retrieve file changes and patches. Optionally limit the diff to one file or get a file-level summary.

Instructions

Diff between two git refs (branches/tags/commits). statOnly for file-level summary only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ref1YesBase ref (branch, tag, or commit hash)
ref2YesComparison ref (branch, tag, or commit hash)
filePathNoLimit diff to a single file (absolute or workspace-relative)
contextNoNumber of context lines around changes. Default: 3
statOnlyNoReturn file-level stat summary only (no patch). Default: false.
Behavior2/5

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

Annotations already set readOnlyHint=true, so the description does not need to state read-only behavior. It adds minimal information beyond the schema—only mentioning the statOnly parameter behavior. No additional traits (e.g., performance, size limits, error cases) are disclosed, which is a gap given no output schema.

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 consists of two short, front-loaded sentences with no excess information. Every word adds value: the first sentence defines the tool's core functionality, and the second highlights a key optional behavior. No wasted space.

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?

Despite having a rich input schema, the description lacks an overview of the output format (e.g., whether it returns patch lines, file list, etc.). Without an output schema, the agent relies on the description for this context, which is missing. The tool is moderately complex (5 parameters), and the description barely covers the 'what' without addressing 'what you get back'.

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 100%, so parameters are well-documented in the schema. The description merely echoes the statOnly parameter's purpose, adding little new meaning. Baseline 3 is appropriate as the description does not significantly enhance understanding of parameters beyond what the schema provides.

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 clearly states the tool computes a diff between two git refs, specifying the resource (git refs) and action (diff). It does not explicitly distinguish this from sibling tools like getGitDiff, but the name and description imply a focus on comparing two arbitrary refs, which provides enough clarity. Missing explicit differentiation prevents 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 Guidelines2/5

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

No guidance on when to use this tool vs alternatives like getGitDiff or git diff in sibling tools. The description does not mention prerequisites, context, or scenarios where this tool is preferred, leaving the agent without direction on tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Oolab-labs/patchwork-os'

If you have feedback or need assistance with the MCP directory API, please join our Discord server