Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

request_changes

Request changes on a Bitbucket Cloud pull request to indicate required modifications before approval. Submit workspace, repository, and pull request ID to initiate the review process.

Instructions

Request changes on a pull request.

Input Schema

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

Implementation Reference

  • The main handler for the 'request_changes' tool in the ToolHandler class's handleTool method. It parses the input arguments using the Zod schema, calls the PullRequestsAPI.requestChanges method, and returns a success message.
    case 'request_changes': {
      const params = toolSchemas.request_changes.parse(args);
      await this.prs.requestChanges(params.workspace, params.repo_slug, params.pr_id);
      return { success: true, message: 'Changes requested' };
    }
  • Zod schema definition for validating input parameters of the 'request_changes' tool: workspace, repo_slug, and pr_id.
    request_changes: 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'),
    }),
  • Tool registration in the toolDefinitions array exported for MCP, including name, description, and JSON schema for input validation.
    {
      name: 'request_changes',
      description: 'Request changes on 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'],
      },
    },
  • Helper method in PullRequestsAPI that performs the actual Bitbucket API POST request to request changes on a pull request.
    async requestChanges(workspace: string, repo_slug: string, pr_id: number): Promise<void> {
      await this.client.post(
        `/repositories/${workspace}/${repo_slug}/pullrequests/${pr_id}/request-changes`
      );
    }
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 mentions 'request changes' but doesn't clarify if this is a mutating operation, what permissions are required, how it affects the pull request state, or what the expected outcome is. This is a significant gap for a tool that likely modifies data.

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, efficient sentence with zero waste—it directly states the tool's purpose without fluff. It's appropriately sized for a simple tool, though its brevity contributes to gaps in other dimensions.

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 no annotations, no output schema, and a likely mutating operation (implied by 'request changes'), the description is incomplete. It doesn't cover behavioral aspects like side effects, return values, or error conditions, making it inadequate 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?

Schema description coverage is 100%, with clear parameter descriptions in the schema (workspace slug, repository slug, pull request ID). The description adds no additional meaning beyond what the schema provides, such as explaining relationships between parameters or usage nuances, 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.

Purpose3/5

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

The description 'Request changes on a pull request' clearly states the action (request changes) and target resource (pull request), but it's vague about what 'request changes' entails—does it submit a review, add comments, or trigger a workflow? It doesn't distinguish from siblings like 'add_pr_comment' or 'decline_pull_request', which might overlap in purpose.

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. With siblings like 'add_pr_comment', 'approve_pull_request', 'decline_pull_request', and 'update_pull_request', the description lacks context on prerequisites, timing, or distinctions, leaving the agent to guess based on tool names alone.

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