Skip to main content
Glama

git_diff_revisions

Read-onlyIdempotent

Compare two committed Git revisions and filter changes to permitted literal paths, so you can inspect only policy-allowed differences.

Instructions

Compare two committed trees, filtering complete changes by permitted literal paths. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy.

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": {
      "base": "<base>",
      "target": "<target>"
    },
    "name": "git_diff_revisions"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYes
pathsNo
targetYes
repo_pathNoOptional repository root. Omit to use the server's fixed repository. An explicit path must identify that same repository.
context_linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.10.19

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered structurally. The description adds useful policy context that results and operations are restricted according to project policy and that path filtering is literal, but it does not describe return format or output behavior.

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?

Two front-loaded sentences with no filler. The core action is stated first, followed by repository and policy constraints.

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 five parameters, two required and only 20% schema coverage, and no output schema, the description is too sparse. It leaves base, target, paths format, and context_lines undefined, and gives no sense of the returned diff structure beyond a vague policy restriction.

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 description coverage is only 20%, and the description does not compensate: it only repeats repo_path omission and adds 'permitted literal paths' for paths. The required base and target parameters are never explained, nor is context_lines.

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: 'Compare two committed trees', which clearly describes a revision-to-revision diff. The scope ('committed trees') implicitly distinguishes it from sibling unstaged/staged diff tools, though it does not name those alternatives explicitly.

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?

Only gives guidance for repo_path ('Omit repo_path to use the configured repository') and a vague policy note. It does not explain when to choose this tool over git_diff, git_diff_staged, git_diff_unstaged, or git_show, nor any when-not conditions.

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