Skip to main content
Glama
pdogra1299
by pdogra1299

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);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation ('Remove') but does not specify permissions required, whether the action is reversible, or any side effects (e.g., notifications, status changes). This leaves significant gaps for a tool that modifies pull request states.

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, making it highly concise and front-loaded. It efficiently communicates the core purpose without unnecessary elaboration.

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 tool's complexity as a mutation operation with no annotations and no output schema, the description is insufficient. It lacks details on behavioral traits (e.g., effects, error conditions) and does not compensate for the absence of structured data, making it incomplete for safe and effective use by an AI agent.

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 schema description coverage is 100%, with all parameters documented in the input schema. The description does not add any additional meaning or context beyond what the schema provides (e.g., it does not explain how parameters interact or typical use cases), so it meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Remove') and target ('change request from a pull request'), providing a specific verb+resource combination. However, it does not explicitly differentiate from sibling tools like 'unapprove_pull_request' or 'update_pull_request', which might have overlapping contexts in pull request management.

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. For example, it does not specify prerequisites (e.g., that a change request must exist) or contrast with tools like 'approve_pull_request' or 'unapprove_pull_request' in handling pull request states.

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

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

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