Skip to main content
Glama

Get pull request diff

get_pr_diff
Read-only

Fetch the raw unified diff of a GitHub pull request. Use offset and limit to page through large diffs.

Instructions

Fetch a raw unified diff. Use offset and limit to page through very large pull requests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesGitHub repository name
limitNoMaximum diff lines to return (default 4000)
ownerYesGitHub repository owner or organization
offsetNoFirst diff line to return
pull_numberYesPull request number
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the read-only nature is covered. The description adds valuable behavioral context by explaining pagination via offset/limit and noting that the diff is 'raw', which goes beyond the annotations.

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?

The description is two short sentences with the core action front-loaded. Every word contributes to understanding the tool's function and usage. No redundancy or filler.

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 no output schema, the description specifies the output ('raw unified diff') and covers the main usage nuance (pagination). It is complete enough for the agent to select and use the tool correctly, though it could mention defaults or return format more explicitly.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents all parameters. The description adds meaning to offset and limit by explicitly describing their role in paging through large pull requests, which is more specific than the schema's basic descriptions.

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?

The description uses a specific verb 'Fetch' and resource 'raw unified diff', clearly distinguishing it from sibling tools like get_pr (which would retrieve pull request metadata). The purpose is immediately obvious.

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 description provides guidance on using offset and limit for large pull requests, but it does not explicitly state when to use this tool versus alternatives such as get_pr or other sibling tools. The usage context is implied but lacks formal exclusions or alternative recommendations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nexicturbo/github-pr-control-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server