update_issue
Modify existing Bitbucket Cloud issues by updating title, content, state, priority, assignee, or issue type to track project changes.
Instructions
Update an existing issue.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug | |
| issue_id | Yes | The issue ID | |
| title | No | New title | |
| content | No | New content | |
| state | No | New state | |
| kind | No | Issue type | |
| priority | No | Priority level | |
| assignee | No | Assignee UUID |
Implementation Reference
- src/tools/index.ts:1038-1042 (handler)Handler logic in ToolHandler.handleTool that parses arguments and delegates to IssuesAPI.updatecase 'update_issue': { const params = toolSchemas.update_issue.parse(args); const { workspace, repo_slug, issue_id, ...updates } = params; return this.issues.update(workspace, repo_slug, issue_id, updates); }
- src/tools/index.ts:227-243 (schema)Zod input schema for validating update_issue tool parametersupdate_issue: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), issue_id: z.number().describe('The issue ID'), title: z.string().optional().describe('New title'), content: z.string().optional().describe('New content'), state: z .enum(['new', 'open', 'resolved', 'on hold', 'invalid', 'duplicate', 'wontfix', 'closed']) .optional() .describe('New state'), kind: z.enum(['bug', 'enhancement', 'proposal', 'task']).optional().describe('Issue type'), priority: z .enum(['trivial', 'minor', 'major', 'critical', 'blocker']) .optional() .describe('Priority level'), assignee: z.string().optional().describe('Assignee UUID'), }),
- src/tools/index.ts:728-758 (registration)MCP tool registration including name, description, and JSON input schema{ name: 'update_issue', description: 'Update an existing issue.', inputSchema: { type: 'object' as const, properties: { workspace: { type: 'string', description: 'The workspace slug' }, repo_slug: { type: 'string', description: 'The repository slug' }, issue_id: { type: 'number', description: 'The issue ID' }, title: { type: 'string', description: 'New title' }, content: { type: 'string', description: 'New content' }, state: { type: 'string', enum: ['new', 'open', 'resolved', 'on hold', 'invalid', 'duplicate', 'wontfix', 'closed'], description: 'New state', }, kind: { type: 'string', enum: ['bug', 'enhancement', 'proposal', 'task'], description: 'Issue type', }, priority: { type: 'string', enum: ['trivial', 'minor', 'major', 'critical', 'blocker'], description: 'Priority level', }, assignee: { type: 'string', description: 'Assignee UUID' }, }, required: ['workspace', 'repo_slug', 'issue_id'], }, },
- src/api/issues.ts:58-84 (helper)IssuesAPI.update method that constructs the request body and makes the Bitbucket API PUT call to update the issueasync update( workspace: string, repo_slug: string, issue_id: number, updates: { title?: string; content?: string; state?: BitbucketIssue['state']; kind?: BitbucketIssue['kind']; priority?: BitbucketIssue['priority']; assignee?: string; } ): Promise<BitbucketIssue> { const body: Record<string, unknown> = {}; if (updates.title) body.title = updates.title; if (updates.content) body.content = { raw: updates.content }; if (updates.state) body.state = updates.state; if (updates.kind) body.kind = updates.kind; if (updates.priority) body.priority = updates.priority; if (updates.assignee) body.assignee = { uuid: updates.assignee }; return this.client.put<BitbucketIssue>( `/repositories/${workspace}/${repo_slug}/issues/${issue_id}`, body ); }