Skip to main content
Glama
jlromano

Bitbucket MCP Server

by jlromano

approve_pull_request

Approve pull requests in Bitbucket repositories to merge code changes after review. Specify workspace, repository, and pull request ID to complete the approval process.

Instructions

Approve a pull request

Input Schema

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

Implementation Reference

  • The implementation of the approvePullRequest method in the BitbucketClient class.
    async approvePullRequest(workspace: string, repoSlug: string, prId: number): Promise<void> {
      await this.api.post(`/repositories/${workspace}/${repoSlug}/pullrequests/${prId}/approve`);
    }
  • The tool definition (schema) for 'approve_pull_request'.
    {
      name: 'approve_pull_request',
      description: 'Approve a pull request',
      inputSchema: {
        type: 'object',
        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'],
      },
    },
  • src/index.ts:529-544 (registration)
    The handler logic in index.ts that calls approvePullRequest when the 'approve_pull_request' tool is requested.
    case 'approve_pull_request': {
      const { workspace, repo_slug, pr_id } = args as {
        workspace: string;
        repo_slug: string;
        pr_id: number;
      };
      await client.approvePullRequest(workspace, repo_slug, pr_id);
      return {
        content: [
          {
            type: 'text',
            text: `Pull request #${pr_id} approved successfully`,
          },
        ],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Approve' implies a write/mutation operation that changes pull request state, but the description doesn't specify what happens after approval (does it trigger merges? change status?), what permissions are required, whether the action is reversible, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant behavioral information gap.

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 maximally concise - a single four-word phrase that communicates the core function without any wasted words. It's front-loaded with the essential action and resource. For such a simple tool, this level of conciseness is appropriate and efficient.

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 this is a mutation tool (approving pull requests) with no annotations and no output schema, the description is incomplete. It doesn't explain what 'approve' means operationally, what happens after approval, what permissions are needed, or what the tool returns. For a tool that presumably changes system state, more behavioral context is needed despite the concise description.

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 the schema already fully documents all three parameters (workspace, repo_slug, pr_id). The description adds no parameter information beyond what's in the schema - it doesn't explain parameter relationships, format expectations, or provide examples. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.

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 provides basic purpose. However, it doesn't distinguish this tool from sibling tools like 'merge_pull_request' or 'add_pull_request_comment' - it's unclear how approval differs from merging or what specific approval action is performed. The description is functional but lacks specificity about what 'approve' means 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?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (e.g., needing review permissions), when approval is appropriate versus merging, or how it relates to sibling tools like 'merge_pull_request' or 'add_pull_request_comment'. The agent must infer usage context entirely from the tool name and sibling names.

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

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