Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

Github Get Pr Diff

github_get_pr_diff
Read-only

Get the diff of a pull request with a size cap, returning a truncation notice when the patch exceeds the limit.

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.

  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 declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context about truncation: it explains that bytes_total reflects the full patch size even when the response is truncated, and that max_bytes caps the output. This goes beyond the annotations and helps the agent interpret partial results correctly.

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?

Two concise sentences with the main action and key nuance front-loaded. Every word earns its place, except perhaps the cryptic 'See #314', which is a minor reference but doesn't detract from clarity. The description is efficient and well-structured.

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?

The tool has an output schema (not shown), so return values are documented elsewhere. The description covers the essential behavioral nuance (truncation and bytes_total) and the capping mechanism. However, it lacks usage context—when to choose this over similar PR-related tools—which would make it more complete. Given its simplicity and the presence of an output schema, the coverage is adequate but not exhaustive.

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?

Schema description coverage is only 25% (only max_bytes has a description). The description mentions max_bytes and its capping behavior, but the schema already says 'Cap on the patch returned. Pass 0 to learn the size without reading the patch'. It adds no new meaning for repo_owner, repo_name, or pr_number, which are trivial. The mention of 'bytes_total' pertains to output, not parameters. Baseline 3 is appropriate because the key parameter is already documented and the others are self-explanatory.

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 clearly states the verb ('Fetches') and the resource ('diff/patch of a specific pull request'), and specifies the key constraint ('capped at max_bytes'). This is specific enough to distinguish it from sibling tools like github_get_pr_content, though it doesn't explicitly name them.

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?

The description provides no guidance on when to use this tool versus alternatives such as github_get_pr_content or github_get_pr_status_checks. The cryptic 'See #314' is not actionable for an agent. There is no mention of exclusions, prerequisites, or when not to use it.

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