Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

approve_pull_request

Approve pull requests in Bitbucket Cloud to merge code changes after review. Use this tool to finalize code reviews and enable merging of approved changes.

Instructions

Approve a pull request.

Input Schema

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

Implementation Reference

  • Zod schema definition for approve_pull_request tool input validation.
    approve_pull_request: 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'),
    }),
  • MCP tool registration/definition including name, description, and input schema.
    {
      name: 'approve_pull_request',
      description: 'Approve a pull request.',
      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'],
      },
    },
  • ToolHandler.handleTool case: parses arguments and delegates to PullRequestsAPI.approve.
    case 'approve_pull_request': {
      const params = toolSchemas.approve_pull_request.parse(args);
      await this.prs.approve(params.workspace, params.repo_slug, params.pr_id);
      return { success: true, message: 'Pull request approved' };
    }
  • PullRequestsAPI.approve: core implementation that POSTs to Bitbucket API endpoint to approve the PR.
    async approve(workspace: string, repo_slug: string, pr_id: number): Promise<void> {
      await this.client.post(`/repositories/${workspace}/${repo_slug}/pullrequests/${pr_id}/approve`);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Approve') but doesn't explain what happens after approval (e.g., does it trigger a merge, change status, require additional steps?), potential side effects, or any permissions or rate limits. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, direct sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. This is an example of efficient communication where brevity aligns with clarity for the basic purpose stated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of approving a pull request (a mutation with potential side effects), no annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects, return values, error conditions, or how it fits with sibling tools. For a tool that likely changes state in a version control system, more context is needed to use it effectively.

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 has 100% description coverage, with clear documentation for all three parameters (workspace, repo_slug, pr_id). The description adds no additional meaning beyond what the schema provides, such as format examples or contextual usage. With high schema coverage, the baseline score of 3 is appropriate as the schema handles the parameter semantics adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Approve') and resource ('a pull request'), which is clear but basic. It doesn't distinguish this tool from its sibling 'decline_pull_request' or 'merge_pull_request', which are related pull request actions. The purpose is understandable but lacks specificity about what 'approve' entails in this context.

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?

No guidance is provided on when to use this tool versus alternatives like 'decline_pull_request', 'merge_pull_request', or 'request_changes'. The description doesn't mention prerequisites, such as needing review permissions or the pull request being in a mergeable state. It's a standalone statement with no context for selection.

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

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