Skip to main content
Glama
Gerrit OpenAPI MCP

Gerrit OpenAPI MCP

by davido

Getprojectsprojectidbranchesbranchidfilesfileidcontent

getProjectsProjectIdBranchesBranchIdFilesFileIdContent

Retrieve the content of a file from the HEAD revision of a specified branch in a Gerrit project. Use it to read file contents at the branch tip by project, branch, and file ID.

Instructions

Gets the content of a file from the HEAD revision of a certain branch.

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": "getProjectsProjectIdBranchesBranchIdFilesFileIdContent"
  }
}

Input Schema

NameRequiredDescriptionDefault
file-idYes
branch-idYes
project-idYes

Output Schema

NameRequiredDescriptionDefault
resultNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It correctly signals a read operation against branch HEAD, but does not mention encoding, binary files, truncation, authentication, or what happens if the file does not exist at HEAD.

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?

A single well-formed sentence that is front-loaded with the action and scope. There is no filler or repetition.

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?

An output schema exists, so return-value details are less necessary in the description. Still, for a three-parameter file-content retrieval tool with no annotations, the definition leaves gaps around content representation, binary handling, and error behavior.

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?

All three required parameters have 0% schema description coverage, and the description adds no meaning beyond the parameter names. It does not explain project-id, branch-id, or file-id formats, path encoding, or validation expectations.

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 states a specific verb and resource: retrieving file content, scoped to the HEAD revision of a branch. This clearly distinguishes it from commit-revision content siblings such as getProjectsProjectIdCommitsCommitIdFilesFileIdContent, though it does not explicitly name those alternatives.

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 HEAD-of-branch scoping implies when to use this tool versus commit-pinned or diff variants. However, there is no explicit guidance about when not to use it or which sibling to prefer for a specific commit.

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