Skip to main content
Glama
phpl

bitbucket-mcp-server

by phpl

get_pull_request_file_diff

Retrieve a structured line-by-line diff for a specific file in a pull request, with hunks, segments, and exact line numbers.

Instructions

Get structured line-by-line diff for a specific file in a pull request. Returns JSON with hunks, segments, and exact line numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe path to the file to diff (e.g., 'src/main.ts')
projectKeyYesThe Bitbucket project key
contextLinesNoNumber of context lines around changes (default: 10)
pullRequestIdYesThe pull request ID
repositorySlugYesThe repository slug
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the return is JSON with hunks/segments/line numbers, which is helpful, but it does not explicitly state it's read-only, mention error conditions, or describe any side effects. The verb 'Get' implies read-only, but the text could be more explicit.

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, front-loaded with the core purpose and followed by a concise explanation of the return value. Every sentence earns its place with no waste.

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 has a clear scope (single file diff) and the schema covers all parameters. No output schema exists, but the description provides an overview of the return format. It lacks explicit differentiation from get_pull_request_diff, but overall it is adequate for an agent to understand and invoke the 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%, so all 5 parameters are already documented. The description adds no additional parameter information beyond the schema, matching the baseline of 3 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 uses a specific verb ('Get') and identifies the exact resource ('structured line-by-line diff for a specific file in a pull request'). It also distinguishes from sibling tools like get_pull_request_diff by emphasizing 'specific file' and 'structured' output, making its purpose clear and unique.

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 implies when to use this tool (when you need a file-specific diff) and 'structured' hints at the JSON format. However, it does not explicitly name alternatives or state when not to use it, so it's clear context but lacks explicit exclusions.

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/phpl/bitbucket-mcp-server'

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