Skip to main content
Glama

diff

Read-onlyIdempotent

Compare two commits to list added, removed, and changed files, and show before/after values for every changed JSON field.

Instructions

What changed between two commits (to defaults to the files as they are now): each file added, removed or changed, and for JSON every field that changed with its value before and after (elements and other items with ids are matched by id, so a path reads /elements/intro/elements/headline/props/y).

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": {
      "from": "<from>"
    },
    "name": "diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
fromYes
pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description goes beyond that by disclosing the result shape (per-file added/removed/changed, per-field before/after for JSON) and the id-based matching rule that determines the reported paths. It does not cover ordering, size limits, or behavior on non-JSON/binary files, so it is not exhaustive.

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?

One dense but front-loaded sentence that leads with the core question ('what changed between two commits') and puts elaboration in a parenthetical. The nested id-matching explanation is wordy, but every clause conveys real semantics rather than filler.

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?

With no output schema, the description correctly spends its space explaining the return content, which is the biggest risk area here. However, for a 3-parameter tool at 0% schema coverage, leaving 'path' and the accepted commit-reference format unexplained leaves an agent guessing when constructing a call.

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 0%, so the description must carry the parameter burden. It explains the default for 'to' clearly but says nothing about the required 'from' (commit id, ref, or hash format) and nothing about 'path', which is left entirely undocumented.

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?

States a specific verb and resource: what changed between two commits, with the added detail that files are reported as added/removed/changed and JSON fields with before/after values. This is far more specific than the bare name 'diff'. It does not differentiate from plausible siblings such as 'changes' or 'compare', 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?

Usage is only implied: the parenthetical explains that 'to' defaults to the files as they are now, which tells the agent the common one-commit case works. There is no explicit when-to-use or when-not-to-use guidance and no named alternative for related tasks.

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

Deploy Server

Other Tools