Skip to main content
Glama
Gerrit OpenAPI MCP

Gerrit OpenAPI MCP

by davido

Getprojectsprojectidcommitscommitidfilesfileiddiff

getProjectsProjectIdCommitsCommitIdFilesFileIdDiff

Get the diff for a single file between two commits in a Gerrit project. Requires a base commit and supports optional intraline and whitespace parameters.

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>",
      "commit-id": "<commit-id>",
      "file-id": "<file-id>"
    },
    "name": "getProjectsProjectIdCommitsCommitIdFilesFileIdDiff"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNo
file-idYes
commit-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, the description must carry the full behavioral burden, and it does not. It says nothing about permissions, whether the diff is returned raw or unified, how whitespace or intraline options change output, or pagination/size limits for large diffs.

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 short sentences with the purpose front-loaded and the base-parameter constraint immediately after. No filler, though the parenthetical '(same as Diff Between Commits)' is only loosely informative.

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?

An output schema exists, so return-value explanation is not owed, but with six parameters at zero schema coverage and no annotations, the definition is too thin. The meanings of intraline and whitespace in particular are left for the agent to guess.

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 coverage is 0% across 6 parameters, so the description must compensate, and it only covers one: it correctly clarifies that base is required even though the schema lists only three required fields. It adds nothing for intraline, whitespace, or file-id/commit-id formats, leaving half the inputs opaque.

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 names a specific verb and resource: 'Gets the diff for a single file between two commits.' The phrase 'single file' differentiates it from the whole-commit diff sibling, although the sibling is not named explicitly.

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: 'single file between two commits' tells the agent the scope, and the note that base is required is a real prerequisite. However, there is no explicit statement of when to prefer this tool over the commit-level diff or the branch-level file diff.

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