Skip to main content
Glama
Gerrit OpenAPI MCP

Gerrit OpenAPI MCP

by davido

Getprojectsprojectidbranchesbranchidfilesfileiddiff

getProjectsProjectIdBranchesBranchIdFilesFileIdDiff

Retrieve the diff for a single file between two commits by providing the required base commit plus project, branch, and file ID.

Instructions

Gets the diff for a single file between two commits. The base query parameter is required (same as Diff Between Commits).

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": {
      "project-id": "<project-id>",
      "branch-id": "<branch-id>",
      "file-id": "<file-id>"
    },
    "name": "getProjectsProjectIdBranchesBranchIdFilesFileIdDiff"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNo
file-idYes
branch-idYes
intralineNo
project-idYes
whitespaceNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations at all, the description carries the full burden, and it discloses only that 'base' is required. It says nothing about how the two sides of the diff are determined, how the optional intraline and whitespace switches change output, or whether this is a pure read with any size/rate constraints. The output schema covers return shape, but behavioral context for the optional modifiers is absent.

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?

Two front-loaded sentences with no filler; the critical requirement is stated immediately. The parenthetical is terse to the point of being cryptic, but nothing is wasted.

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?

For a six-parameter tool with zero schema coverage and no annotations, this is thin: most parameter semantics and all behavioral traits are missing. The existing output schema does relieve it of explaining return values, but the remaining gaps are substantial.

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 0% across six parameters, so the description must compensate and largely does not. It flags 'base' as required (notably it is absent from the schema's required list, which is useful clarification but also an unresolved inconsistency) yet leaves intraline and whitespace — the two parameters that most change the diff output — entirely unexplained.

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+resource: fetches the diff for a single file between two commits, which distinguishes it from the sibling Content and commit-level Diff tools. It does not explicitly name those alternatives, so the differentiation is implicit rather than spelled out.

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 parenthetical '(same as Diff Between Commits)' gestures at the related commit-scoped tool and clarifies that the base parameter is mandatory, which is genuine usage context. However, it never says when to pick this branch-file diff over getProjectsProjectIdCommitsCommitIdFilesFileIdDiff, nor any prerequisites such as needing the base branch to exist.

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