Skip to main content
Glama

Summarize a pull request diff

summarize_pull_request
Read-onlyIdempotent

Fetch a single GitHub pull request and return a bounded digest of its metadata, description, and truncated diff; the host writes the prose without a language-model call.

Instructions

Fetch one pull request and return a bounded digest of its metadata, description, and diff. Patches are truncated. This tool does not call a language model; the host writes the prose from the digest.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name, without the owner
ownerYesGitHub user or organization login
numberYesPull request number
fileLimitNoMaximum files to include. Defaults to 20.
maxPatchCharsNoTotal characters of patch text to keep across all files. Defaults to 8000.

Output Schema

NameRequiredDescriptionDefault
urlYes
bodyYes
repoYes
draftYes
filesYes
ownerYes
titleYes
authorYes
numberYes
baseRefYes
headRefYes
headShaYes
additionsYes
deletionsYes
bodyTruncatedYes
filesTruncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Adds real context beyond the annotations: patches are truncated, the digest is bounded, and critically the host (not the tool) writes the prose — an agent that expected a finished summary would otherwise be misled. Nothing is said about auth requirements or rate limits, so not a 5.

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?

Three short sentences, zero filler, with the core behavior (what is returned) front-loaded and the important caveat about no LLM call placed where it will actually be read.

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 and parameter coverage is complete, so return values needn't be spelled out. The description covers truncation, digest bounding, and the no-LLM contract — sufficient for correct invocation, though it could note the default limits inline.

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 coverage is 100% and every parameter, including fileLimit and maxPatchChars with their defaults and bounds, is documented in-schema. The description's mention of a 'bounded digest' and truncated patches reinforces those limits but adds no syntax or format detail beyond the schema.

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 and resource ('Fetch one pull request') plus precisely what it returns ('a bounded digest of its metadata, description, and diff'). The singular 'one pull request' implicitly distinguishes it from the list_open_pull_requests sibling, but no sibling is named explicitly.

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 when-to-use or when-not guidance, and no alternatives are named among list_open_pull_requests, get_repo_activity, or the issue tools. The note about not calling a language model sets expectations about output but does not route the agent's tool choice.

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