Skip to main content
Glama

ngit_pr_diff

Read-only

Fetches a PR's diffstat and unified diff (merge-base..tip) from its git servers for code review. Returns the full change set for a given repo and PR id.

Instructions

The code change of a PR: diffstat + unified diff (merge-base..tip), fetched from its git servers.

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": {
      "repo": "<repo>",
      "id": "<id>"
    },
    "name": "ngit_pr_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
repoYesnostr://<npub or name@domain>/<relay>/<identifier>, or naddr1...
freshNoforce a network refresh instead of serving the live cache
max_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and openWorldHint; the description usefully adds that content is fetched from remote git servers and that the diff range is merge-base..tip. However, it never discloses truncation behavior or size limits, which matters given a max_bytes ceiling of 2MB, and it says nothing about what happens when a PR is unmerged or the server is unreachable.

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?

A single dense sentence that front-loads the output composition and the fetch origin; no wasted clauses. It leans on git jargon ('diffstat', 'merge-base..tip') without unpacking it, which is a small readability cost but not verbosity.

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?

For a 4-parameter, no-output-schema read tool it conveys the shape of the result (diffstat + unified diff) well enough to call it. But it leaves truncation, failure modes, and two undocumented parameters unexplained, so an agent could easily miss that large diffs get cut off.

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 50%: repo and fresh are self-documented, while id and max_bytes carry no schema description. The description adds no parameter meaning at all – notably it does not explain that max_bytes truncates the diff output, nor what form the PR identifier (id) takes alongside repo.

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: the code change of a PR, returned as diffstat plus unified diff over the merge-base..tip range. That is concrete and distinguishable from generic siblings like ngit_get or ngit_list, though it never explicitly names a sibling to route against.

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 by 'The code change of a PR' – an agent can infer you call this when you need to review a PR's diff. There is no explicit when-to-use, when-not-to-use, or pointer to an alternative tool for merged/closed PR review or commit-level diffs.

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