Skip to main content
Glama

approve_pr

Approve pull requests in Bitbucket repositories by specifying the repository slug and pull request ID to confirm approval.

Instructions

Approve a pull request.

Args: repo_slug: Repository slug pr_id: Pull request ID Returns: Approval confirmation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_slugYes
pr_idYes

Implementation Reference

  • MCP tool handler that approves a pull request by calling BitbucketClient.approve_pr and returns structured response with PR ID and approver.
    @mcp.tool() @handle_bitbucket_error @formatted def approve_pr(repo_slug: str, pr_id: int) -> dict: """Approve a pull request. Args: repo_slug: Repository slug pr_id: Pull request ID Returns: Approval confirmation """ client = get_client() result = client.approve_pr(repo_slug, pr_id) return { "pr_id": pr_id, "approved_by": result.get("user", {}).get("display_name"), }
  • BitbucketClient method implementing the approve_pr functionality via Bitbucket API POST request to /pullrequests/{pr_id}/approve endpoint.
    def approve_pr( self, repo_slug: str, pr_id: int ) -> dict[str, Any]: """Approve a pull request. Args: repo_slug: Repository slug pr_id: Pull request ID Returns: Approval info """ result = self._request( "POST", self._repo_path(repo_slug, "pullrequests", str(pr_id), "approve"), ) return self._require_result(result, "approve PR", f"#{pr_id}")
  • src/server.py:981-981 (registration)
    FastMCP @mcp.tool() decorator registering the approve_pr function as an MCP tool.
    @mcp.tool()

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

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