Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

get_pr_diff

Read-only

Fetch a pull request's diff/patch with a configurable byte limit. Pass max_bytes=0 to learn total patch size without reading it, and see truncation info to know what was omitted.

Instructions

Fetches the diff/patch of a specific pull request, capped at max_bytes. bytes_total is the whole patch either way, so a truncated reply says what was left behind. See #314.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_bytesNoCap on the patch returned. Pass 0 to learn the size without reading the patch
pr_numberYes
repo_nameYes
repo_ownerYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
patchYes
pr_numberYes
truncatedYes
bytes_totalYes
bytes_returnedYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed9 schema fields changedv29.0.0
    • addedInput schema / properties / max_bytes
      Added value: +{
      +  "default": 131072,
      +  "description": "Cap on the patch returned. Pass 0 to learn the size without reading the patch",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / bytes_returned
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / bytes_total
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / patch
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / pr_number
      Added value: +{
      +  "type": "integer"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "pr_number",
      +  "patch",
      +  "bytes_returned",
      +  "bytes_total",
      +  "truncated"
      +]
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  2. Addedv14.0.3
  3. Removedv14.0.0
  4. Addedv11.0.1
  5. Removedv10.0.4
  6. Changed8 schema fields changedv10.0.0
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / pr_number / title
      Removed value: -"Pr Number"
    • removedInput schema / properties / repo_name / title
      Removed value: -"Repo Name"
    • removedInput schema / properties / repo_owner / title
      Removed value: -"Repo Owner"
    • removedInput schema / title
      Removed value: -"get_pr_diffArguments"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"get_pr_diffOutput"
    • addedOutput schema / x-fastmcp-wrap-result
      Added value: +true
  7. Addedv1.0.0

TDQS

B3.4/5.0
Behavior4/5

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

With readOnlyHint and destructiveHint already in annotations, the description adds valuable behavioral detail: the result is capped at max_bytes, and bytes_total always reflects the full patch so truncation is detectable. This goes beyond the annotation safety signals without contradicting them.

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 first two sentences are concise and front-loaded with the core behavior and truncation caveat. However, 'See #314' is a cryptic reference that adds little for an AI agent, and the description could either elaborate or drop it.

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?

The output schema presumably documents return fields, and annotations cover safety, so the core fetch behavior is adequately captured. The main gaps are missing when-to-use guidance relative to closely related tool names and the opaque '#314' reference.

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 only 25% and the description adds little to parameter meaning: it only repeats that max_bytes caps the patch, while the schema already says that. repo_owner, repo_name, and pr_number are never explained, though their purpose is inferable from the tool name.

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 ('Fetches') and names the exact resource ('the diff/patch of a specific pull request'), then adds the max_bytes cap as a distinguishing behavior. This clearly separates it from sibling tools like get_pr_content and get_pr_status_checks.

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?

No guidance is given about when to choose this tool over alternatives (e.g., get_pr_content) or when not to use it. The only contextual phrase is 'specific pull request', which does not establish selection criteria.

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

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/saidsef/mcp-github-pr-issue-analyser'

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