Skip to main content
Glama

remove_requested_changes

Eliminate change requests from a specified pull request in Bitbucket by providing workspace, repository, and pull request ID for streamlined PR management.

Instructions

Remove change request from a pull request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pull_request_idYesPull request ID
repositoryYesRepository slug (e.g., "my-repo")
workspaceYesBitbucket workspace/project key (e.g., "PROJ")

Implementation Reference

  • Core handler function that executes the remove_requested_changes tool logic: validates args, calls Bitbucket API to remove 'needs work' or 'request changes' status for Cloud/Server, returns success/error response.
    async handleRemoveRequestedChanges(args: any) { if (!isApprovePullRequestArgs(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for remove_requested_changes' ); } const { workspace, repository, pull_request_id } = args; try { if (this.apiClient.getIsServer()) { // Bitbucket Server API - remove needs-work status const username = this.username.replace('@', '_'); const apiPath = `/rest/api/latest/projects/${workspace}/repos/${repository}/pull-requests/${pull_request_id}/participants/${username}`; await this.apiClient.makeRequest<any>('put', apiPath, { status: 'UNAPPROVED' }); } else { // Bitbucket Cloud API const apiPath = `/repositories/${workspace}/${repository}/pullrequests/${pull_request_id}/request-changes`; await this.apiClient.makeRequest<any>('delete', apiPath); } return { content: [ { type: 'text', text: JSON.stringify({ message: 'Change request removed from pull request', pull_request_id, removed_by: this.username }, null, 2), }, ], }; } catch (error) { return this.apiClient.handleApiError(error, `removing change request from pull request ${pull_request_id} in ${workspace}/${repository}`); } }
  • Tool schema definition including name, description, and inputSchema for validating arguments: workspace, repository, pull_request_id.
    { name: 'remove_requested_changes', description: 'Remove change request from a pull request', inputSchema: { type: 'object', properties: { workspace: { type: 'string', description: 'Bitbucket workspace/project key (e.g., "PROJ")', }, repository: { type: 'string', description: 'Repository slug (e.g., "my-repo")', }, pull_request_id: { type: 'number', description: 'Pull request ID', }, }, required: ['workspace', 'repository', 'pull_request_id'], }, },
  • src/index.ts:130-131 (registration)
    Registration in main server switch statement that routes tool calls to the reviewHandlers.handleRemoveRequestedChanges method.
    case 'remove_requested_changes': return this.reviewHandlers.handleRemoveRequestedChanges(request.params.arguments);

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

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