Skip to main content
Glama

Get PR Diff

bitbucket_get_pull_request_diff
Read-only

Retrieve unified text diffs showing additions and deletions for specific files in Bitbucket pull requests to review code changes.

Instructions

Get the text diff for a specific file in a pull request.

Returns the unified diff showing additions and deletions for the specified file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_keyYesThe project key
repository_slugYesThe repository slug
pull_request_idYesThe pull request ID number
pathYesFile path to get the diff for
context_linesNoNumber of context lines around changes (default: 10)
diff_typeNoEFFECTIVE (merge result) or RANGE (commit range)
whitespaceNoWhitespace handling: SHOW, IGNORE_ALL, or IGNORE_TRAILING

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations declare readOnlyHint=true, which the description aligns with by describing a read operation ('Get'). The description adds value by specifying the output format ('unified diff showing additions and deletions'), which annotations don't cover. However, it lacks context on rate limits, authentication needs, or error conditions, leaving behavioral gaps despite the annotations.

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 two sentences with zero waste: the first states the core purpose, and the second clarifies the output format. It's front-loaded and appropriately sized for a straightforward tool, with every sentence earning its place by adding clarity.

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?

Given the tool's moderate complexity (7 parameters, 4 required), high schema coverage (100%), annotations (readOnlyHint), and output schema (true), the description is mostly complete. It covers purpose and output format but lacks usage guidelines and deeper behavioral context (e.g., error handling), which slightly reduces completeness for an agent's needs.

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%, so parameters are fully documented in the schema. The description adds no parameter-specific information beyond implying 'path' is for file selection and 'context_lines' relates to diff output. It doesn't explain parameter interactions or provide examples, meeting the baseline for high schema coverage.

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 clearly states the specific action ('Get the text diff') and resource ('for a specific file in a pull request'), distinguishing it from sibling tools like 'bitbucket_get_pull_request_changes' (which likely lists changed files) or 'bitbucket_get_pull_request' (which returns PR metadata). The second sentence reinforces the output format, making the purpose unambiguous.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'bitbucket_get_pull_request_changes' (for file lists) or 'bitbucket_get_file_content' (for file contents without diffs), nor does it specify prerequisites or exclusions (e.g., requires an existing PR). Usage is implied only by 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.

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/christopherekfeldt/mcp-bitbucket-dc'

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