Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

get_pr_diff

Retrieve the complete diff showing all changes in a Bitbucket Cloud pull request to review modifications before merging.

Instructions

Get the diff for a pull request showing all changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
pr_idYesThe pull request ID

Implementation Reference

  • The handler case for the 'get_pr_diff' tool in the ToolHandler class's handleTool method. It parses the input arguments using the schema, calls the PullRequestsAPI.getDiff method to fetch the pull request diff, and returns it wrapped in an object.
    case 'get_pr_diff': { const params = toolSchemas.get_pr_diff.parse(args); const diff = await this.prs.getDiff(params.workspace, params.repo_slug, params.pr_id); return { diff }; }
  • Zod schema definition for the input parameters of the 'get_pr_diff' tool, part of the toolSchemas object.
    get_pr_diff: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), pr_id: z.number().describe('The pull request ID'), }),
  • Tool registration definition in the toolDefinitions array for MCP protocol, specifying the name, description, and JSON schema for input validation.
    { name: 'get_pr_diff', description: 'Get the diff for a pull request showing all changes.', inputSchema: { type: 'object' as const, properties: { workspace: { type: 'string', description: 'The workspace slug' }, repo_slug: { type: 'string', description: 'The repository slug' }, pr_id: { type: 'number', description: 'The pull request ID' }, }, required: ['workspace', 'repo_slug', 'pr_id'], }, },

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

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