Skip to main content
Glama
Upendrasengar

bitbucket-server-mcp

get_diff

Read-onlyIdempotent

Get the diff of a pull request, optionally returning only a list of changed files with line counts. Limit diff to a specific file or configure context lines.

Instructions

Get the diff of a pull request. Use stat=true for a lightweight summary of changed files (and line counts if the server supports it) instead of the full diff.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prIdYesPull request ID.
statNoIf true, return only the list of changed files and types (ADD, MODIFY, DELETE, RENAME, COPY) instead of the full diff. Line count summary included when available (Bitbucket DC 9.1+).
projectNoProject key. Defaults to BITBUCKET_DEFAULT_PROJECT.
filePathNoPath to a specific file to get the diff for. Use with stat=true first to discover file paths, then request individual diffs.
repositoryYesRepository slug.
contextLinesNoNumber of context lines around changes (default: 10). Ignored when stat=true.
maxLinesPerFileNoMax lines per file. 0 = no limit. Defaults to BITBUCKET_DIFF_MAX_LINES_PER_FILE. Ignored when stat=true.
Behavior4/5

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

Annotations already declare the tool as read-only, idempotent, and non-destructive. The description adds context about the stat parameter producing a summary and server-dependent line counts. No contradictions.

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 long, front-loads the main purpose, and contains no superfluous text. Every word adds value.

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 no output schema and 7 parameters, the description captures the essential behavior (full diff vs. stat summary). It could mention that the output is a diff, but that is implied by the name and parameter descriptions. Annotations cover safety aspects.

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 input schema provides complete descriptions for all 7 parameters (100% coverage). The description does not add significant new meaning beyond what the schema already offers, so baseline 3 is appropriate.

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 'Get the diff of a pull request' with a specific verb and resource. It also distinguishes the stat option for a summary, and no sibling tool overlaps with this exact functionality.

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 explicit guidance on when to use `stat=true` for a lightweight summary versus the full diff. However, it does not mention alternative tools or conditions where this tool should not be used.

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

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