Skip to main content
Glama
TheTeamRAH

scm-broker-mcp

by TheTeamRAH

get_pull_request_diff

Retrieve the unified diff for a pull request by passing provider, repository, and pull request ID to inspect code changes.

Instructions

Get a pull request unified diff.

Args: provider: Provider key. repo: Repository identity. pull_request_id: Provider pull-request identifier.

Returns: Mapping shaped as {"diff": str, "raw": None}.

Examples: Input: {"provider": "github", "repo": "o/r", "pull_request_id": "7"}. Output: {"diff": "diff --git ...", "raw": None}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYes
providerYes
pull_request_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It implies a read-only operation via the verb 'Get' and shows the output shape, but it does not explicitly state that it has no destructive side effects, nor does it cover auth requirements, errors, or diff truncation behavior.

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?

The description is front-loaded with the core purpose and then cleanly organized into `Args`, `Returns`, and `Examples` sections. The example input/output pairs are directly useful and no sentence is wasted.

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?

For a fairly simple read tool with three required string parameters, the description covers the basic call path and gives an illustrative example. It is not fully complete because it leaves provider key values ambiguous, does not explain the `raw` field, and says nothing about what happens when a PR has no diff or is hidden. The existing output schema reduces the need to describe returns, but the provider ambiguity remains a real gap.

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?

The schema has 0% description coverage, so the description must add semantic value. It provides arg names plus example values (`provider: 'github'`, `repo: 'o/r'`, `pull_request_id: '7'`), which clarifies expected format better than the schema. However, the prose descriptions like 'Provider key' and 'Repository identity' are vague and do not enumerate valid provider values or the full repo format.

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: 'Get a pull request unified diff.' This clearly identifies what the tool does and distinguishes it from `list_pull_requests` or `get_pull_request` through the 'unified diff' object. It does not explicitly name any sibling alternative, so it stops short of a full 5.

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?

There is no guidance about when to use this tool instead of siblings such as `get_pull_request` or `list_pull_request_commits`, nor any mention of prerequisites or exclusions. Usage must be inferred entirely from the tool name and description.

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