Skip to main content
Glama
jamesjfoong

github-pr-review-mcp

by jamesjfoong

get_pr_diff_hunks

Retrieves per-file diff hunks with line mappings for a pull request, enabling accurate inline comment placement by providing old and new line positions with patch content.

Instructions

Get diff hunks with line mapping for all changed files in a PR. Returns per-file hunks with oldStart/oldLines, newStart/newLines, and patch content for accurate inline comment placement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository name
ownerYesRepository owner/organization
prNumberYesPull request number

Schema Changelog

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

  1. First observedv1.0.4

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It clearly states that the tool returns per-file hunks with oldStart/oldLines, newStart/newLines, and patch content, making the read-only nature and output semantics explicit enough for a retrieval tool.

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 compact sentences: the first states the action and scope, the second details the return structure. No filler or redundant information.

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?

For a simple three-parameter retrieval tool, the description is complete: it names the resource, parameters are fully covered by schema, and the return structure is partially specified. It does not mention edge cases like empty diffs or authentication requirements, but these are minor for this low-complexity tool.

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 100%, and each parameter has a basic description like 'Repository name' and 'Pull request number.' The description adds no additional parameter-specific meaning, so the baseline of 3 applies.

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 and resource: 'Get diff hunks with line mapping for all changed files in a PR.' It clearly distinguishes itself from siblings like get_pr_files and get_pr_details by specifying diff hunks, line mapping, and inline comment placement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for accurate inline comment placement' provides clear usage context, indicating this tool is for retrieving hunk-level data needed to place comments. It does not explicitly name alternatives or state when not to use it, but the intended use case is clear.

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/jamesjfoong/github-pr-review-mcp'

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