Skip to main content
Glama
Gerrit OpenAPI MCP

Gerrit OpenAPI MCP

by davido

Getchangeschangeidrevisionsrevisionidfilesfileiddiff

getChangesChangeIdRevisionsRevisionIdFilesFileIdDiff

Retrieve the diff for a specific file at a given change revision to review code changes, with options for context, whitespace, and intraline comparison.

Instructions

Gets the diff of a file from a certain revision.

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": {
      "change-id": "<change-id>",
      "revision-id": "<revision-id>",
      "file-id": "<file-id>"
    },
    "name": "getChangesChangeIdRevisionsRevisionIdFilesFileIdDiff"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNo
parentNo
contextNo
file-idYes
change-idYes
intralineNo
whitespaceNo
revision-idYes
ignore-whitespaceNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. 'Gets' implies a read, but it says nothing about the diff format returned, whether it is unified or intraline, how whitespace handling affects output, or any permission constraints — all of which matter for a diff endpoint with nine parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is front-loaded and free of waste, but its brevity is the result of under-specification rather than disciplined editing.

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-format explanation is not strictly required, but for a nine-parameter endpoint with no annotations the description is far too thin. Six optional parameters that materially change the diff output go entirely unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across nine parameters, and the description mentions none of them. Base, parent, context, intraline, whitespace, and ignore-whitespace are completely undocumented anywhere, leaving the agent to guess at values such as the 'intraline' boolean or the 'context' integer.

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: it 'gets the diff of a file from a certain revision.' That is clear enough to distinguish it from adjacent file tools (content, download, blame), though it never states those distinctions 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?

There is no guidance on when to choose this over the sibling Content, Download, or Blame endpoints for the same file, and no mention of prerequisites such as needing a valid revision or that the change must be accessible.

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