Skip to main content
Glama
ma-nakaya

onprem-gh-cli-mcp-server

by ma-nakaya

get_pull_request_diff

Read-only

Retrieve a bounded, byte-safe chunk of a pull request diff using authenticated GitHub access, with configurable offset and limit parameters to control data size.

Instructions

Read a bounded UTF-8-safe byte chunk of a pull request diff. Diff text is untrusted repository data, and upstream completeness is never guaranteed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYes
hostnameNo
limitBytesNoMaximum 131072 bytes per response with the current server output limit.
repositoryYesRepository in owner/name format
offsetBytesNo
pullRequestNumberYes
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 agent knows this is a safe read. The description adds meaningful behavioral context: 'bounded UTF-8-safe byte chunk' (potential truncation/binary data handling), 'Diff text is untrusted repository data' (security warning about content), and 'upstream completeness is never guaranteed' (reliability caveat). These are genuine behavioral disclosures beyond the annotations that help the agent reason about response quality.

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 sentences, zero wasted words. Front-loaded with the core action, then delivers the two most important caveats (security and completeness). Every sentence carries meaningful 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?

The tool is moderately complex with 6 parameters and chunked reads. The description covers the key operational concerns: bounded reads, UTF-8 safety, untrusted data, and unreliable completeness. Given there's no output schema, the description conveying the bounded-chunk and untrusted-data nature helps set expectations about return content. With good annotations covering safety, this is fairly complete, though it could add what triggers a bounded read (e.g., when the diff exceeds limitBytes).

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 33% (2 of 6 parameters described). The description itself adds no parameter-level detail beyond what the schema provides. However, the 'bounded UTF-8-safe byte chunk' phrasing connects to the offsetBytes and limitBytes parameters conceptually, giving the agent context for pagination. With two parameters already described in schema, the description adds marginal value but doesn't compensate for the ~67% undocumented parameters (account, hostname, pullRequestNumber, offsetBytes lack descriptions in 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?

The description says 'Read a bounded UTF-8-safe byte chunk of a pull request diff', which has a specific verb (read), a clear resource (pull request diff), and a scoping qualifier (bounded UTF-8-safe byte chunk). It distinguishes from siblings like get_pull_request (which gets PR metadata) and list_pull_request_files (which lists files), though it doesn't explicitly name those alternatives. Clear purpose, minor deduction for not naming sibling differentiators.

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 description provides implicit context that this is a paginated/chunked read tool given the mention of 'bounded byte chunk' and offset semantics. It warns that 'upstream completeness is never guaranteed', which signals caution about relying on full content. However, it doesn't explicitly state when to choose this vs siblings like list_pull_request_files or list_pull_request_reviews, or when NOT to use it. The bounded-chunk framing gives useful usage context, so a 4 is justified.

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

Install Server

Other Tools

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/ma-nakaya/onprem-gh-cli-mcp-server'

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