Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

Github Get Pr Diff

github_get_pr_diff
Read-only

Fetches a pull request's diff with an optional byte cap, returning total size to flag truncation.

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.

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

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

B3.1/5.0
Behavior4/5

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

Annotations already mark the tool as read-only and non-destructive. The description adds valuable behavioral detail beyond that: the patch is capped at max_bytes, bytes_total reports the full patch size even when truncated, and a truncated reply indicates content was left behind. This helps the agent handle 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded with the core action, which is good. However, 'See #314' is cryptic and provides no actionable context for the agent, and the workflow reference is terse. The message is structured but contains a vague reference that reduces overall clarity.

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 exists, so return shape is covered. Annotations cover safety. The description handles the key edge case (truncation) but leaves the required parameters undocumented and refers to an external issue number and a skill for additional context. For a simple read tool this is adequate, but not fully complete.

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 description coverage is only 25%, so the description must compensate for undocumented parameters. It explains the max_bytes cap and truncation behavior, which adds value, but repo_owner, repo_name, and pr_number are not described at all. The required parameters are conventional, but the description does not clarify them or their relationships.

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?

The description opens with a specific verb and resource: 'Fetches the diff/patch of a specific pull request'. This clearly identifies the tool's function. It does not explicitly name sibling tools to differentiate from, but the diff/patch target is distinct enough to be recognizable among similar PR-related tools.

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 points to a skill ('github_get_skill(pr-analysis)') as a workflow convention, but it does not say when to use this tool versus alternatives like github_get_pr_content or github_get_pr_status_checks. There is no when-to-use or when-not-to-use guidance, and no mention of alternatives.

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