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
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug | |
| pr_id | Yes | The pull request ID |
Implementation Reference
- src/tools/index.ts:958-962 (handler)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' }; }
- src/tools/index.ts:117-121 (schema)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'), }),
- src/tools/index.ts:510-522 (registration)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'], }, },
- src/api/pullrequests.ts:148-152 (helper)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` ); }