Skip to main content
Glama
pdogra1299
by pdogra1299

get_pull_request_diff

Retrieve a Bitbucket pull request diff as raw unified diff text, scoped by file path or include/exclude glob patterns, to review added and removed lines.

Instructions

Get a PR diff as raw unified diff text (line numbers derive from @@ headers; +/- prefixes mark ADDED/REMOVED). Scope with file_path (server-side) or include/exclude glob patterns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNoDiff one file only
workspaceYesProject key (e.g., PROJ)
repositoryYesRepository slug
context_linesNoDefault 3; 0 = minimal
pull_request_idYesPull request ID
exclude_patternsNoGlobs to exclude
include_patternsNoGlobs to include
ignore_whitespaceNoServer only

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv3.0.1
    • changedInput schema / properties / context_lines / description
      Previous value: -"Number of context lines around changes (optional, default: 3)"New value: +"Default 3; 0 = minimal"
    • changedInput schema / properties / exclude_patterns / description
      Previous value: -"Array of glob patterns to exclude (e.g., [\"*.lock\", \"*.svg\"]) (optional)"New value: +"Globs to exclude"
    • changedInput schema / properties / file_path / description
      Previous value: -"Specific file path to get diff for (e.g., \"src/index.ts\") (optional)"New value: +"Diff one file only"
    • addedInput schema / properties / ignore_whitespace
      Added value: +{
      +  "description": "Server only",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / include_patterns / description
      Previous value: -"Array of glob patterns to include (e.g., [\"*.res\", \"src/**/*.js\"]) (optional)"New value: +"Globs to include"
    • changedInput schema / properties / repository / description
      Previous value: -"Repository slug (e.g., \"my-repo\")"New value: +"Repository slug"
    • changedInput schema / properties / workspace / description
      Previous value: -"Bitbucket workspace/project key (e.g., \"PROJ\")"New value: +"Project key (e.g., PROJ)"
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does add genuine behavioral context: the output is unified diff text, line numbers come from @@ headers, and +/- prefixes mean added/removed. It also flags that file_path filtering and ignore_whitespace happen server-side. It omits large-diff/truncation behavior, binary file handling, and whether the raw text is paginated, which are notable gaps for a diff-returning read tool but not disqualifying.

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 dense sentences, front-loaded with the verb, resource, and output format, then scoping options. No filler, no repetition of the schema.

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 an 8-parameter read tool with no annotations and no output schema, the description covers the essentials: what is returned and how to scope it. The absence of output schema is largely compensated by the explicit format description, though size/truncation behavior on large diffs remains unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds meaning beyond the schema by framing file_path as the server-side single-file scope versus include/exclude globs, clarifying how the three scoping parameters relate. It does not explain precedence when file_path and patterns are combined, so it falls short of a 5.

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?

States a specific verb and resource ('Get a PR diff') plus the exact return format ('raw unified diff text'), which cleanly separates it from siblings like get_pull_request or get_file_content. An agent can identify the tool without opening the schema.

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

Usage Guidelines3/5

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

It explains how to narrow results ('Scope with file_path (server-side) or include/exclude glob patterns'), which is real usage guidance, but it never states when to prefer this tool over get_pull_request or get_file_content, nor any exclusions or preconditions. Usage is implied rather than explicit.

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