Skip to main content
Glama

getPullRequestDiff

Read-onlyIdempotent

Retrieves changed files and per-file patches for a specified pull request, providing the diff needed for code review.

Instructions

Get the changed files of a pull request, including per-file patches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository name
ownerYesRepository owner
pull_numberYesPull request number

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds that the tool returns per-file patches, but does not disclose additional behavioral details such as diff format, size limits, or pagination. This is acceptable but not exceptional.

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?

One short sentence that front-loads the resource and then specifies the return content. No filler or redundant wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with fully documented parameters and strong annotations, the description covers the essential call intent and output scope. A brief note on the diff format or response shape would make it fully complete, but nothing critical is missing.

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

Parameters3/5

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

The input schema already documents all three parameters (owner, repo, pull_number) with 100% coverage, so the baseline applies. The description adds no parameter-specific guidance beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly identifies the operation as retrieving changed files for a specific pull request, specifying the resource and the exact output scope (changed files with per-file patches). This distinguishes it from sibling tools like getPullRequest, getPullRequestCommits, and getPullRequestActivity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes the intended use clear: when an agent needs the diff or changed files of a pull request. It does not explicitly name sibling alternatives or exclusions, but the context is unambiguous enough to avoid confusion with related PR tools.

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