Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

Github Get Pr Diff

github_get_pr_diff
Read-only

Fetches the net unified diff for a specific pull request, capped by max_bytes, and reports total diff size so truncated responses show what was omitted.

Instructions

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

Workflow and conventions: github_get_skill('pr-analysis').

Input 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

NameRequiredDescriptionDefault
patchYes
pr_numberYes
truncatedYes
bytes_totalYes
bytes_returnedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv42.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only, non-destructive, open-world. The description adds real behavioral context beyond that: the response is capped, and bytes_total is always the untruncated size so a truncated reply reveals what was omitted. That is exactly the truncation semantics an agent needs. Minor deduction for the unparseable 'See #314 and #514' references.

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?

The core sentence leads with the operation and the cap, and the truncation explanation follows directly. 'See #314 and #514' is opaque to an agent that cannot resolve issue numbers and is the one phrase that does not earn its place.

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?

An output schema exists, so return values need not be spelled out, and the description still explains the truncation/size contract. What is missing is routing versus the sibling diff/content tools, which matters given how many PR-reading tools are in this set.

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?

Only 25% schema coverage, but the three undocumented params are self-evident (repo_owner, repo_name, pr_number). The description reinforces max_bytes and explains the bytes_total relationship, which is meaning the schema does not supply on its own for output interpretation.

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 (fetches) and resource (net unified diff of a specific pull request) with the cap already named. The word 'net' plus 'diff' distinguishes it from a raw files listing, but it never mentions the closest sibling github_get_pr_content, so an agent still has to guess which one returns the patch.

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?

There is a pointer to a workflow skill ('github_get_skill(pr-analysis)') which implies context of use, and the max_bytes=0 trick is described in the schema. But the description gives no explicit when-to-use/when-not and no comparison against github_get_pr_content or the inline-comment siblings.

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