create_issue
Create new issues in Bitbucket Cloud repositories to track bugs, enhancements, proposals, or tasks with titles, descriptions, types, priorities, and assignees.
Instructions
Create a new issue in a repository.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug | |
| title | Yes | Issue title | |
| content | No | Issue content/description | |
| kind | No | Issue type | |
| priority | No | Priority level | |
| assignee | No | Assignee UUID |
Implementation Reference
- src/tools/index.ts:1032-1035 (handler)The main handler for the 'create_issue' tool in ToolHandler.handleTool. Parses input arguments using Zod schema and delegates to IssuesAPI.create method.case 'create_issue': { const params = toolSchemas.create_issue.parse(args); return this.issues.create(params); }
- src/api/issues.ts:35-53 (helper)The IssuesAPI.create method that constructs the request body and performs the HTTP POST to Bitbucket API to create the issue.async create(params: CreateIssueParams): Promise<BitbucketIssue> { const { workspace, repo_slug, title, content, kind, priority, assignee } = params; const body: Record<string, unknown> = { title, }; if (content) { body.content = { raw: content }; } if (kind) body.kind = kind; if (priority) body.priority = priority; if (assignee) { body.assignee = { uuid: assignee }; } return this.client.post<BitbucketIssue>(`/repositories/${workspace}/${repo_slug}/issues`, body); }
- src/tools/index.ts:214-225 (schema)Zod schema definition for 'create_issue' tool input validation used in the handler.create_issue: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), title: z.string().describe('Issue title'), content: z.string().optional().describe('Issue content/description'), 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:703-727 (registration)Registration of the 'create_issue' tool in the toolDefinitions array for MCP integration, including description and input schema.{ name: 'create_issue', description: 'Create a new issue in a repository.', inputSchema: { type: 'object' as const, properties: { workspace: { type: 'string', description: 'The workspace slug' }, repo_slug: { type: 'string', description: 'The repository slug' }, title: { type: 'string', description: 'Issue title' }, content: { type: 'string', description: 'Issue content/description' }, 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', 'title'], }, },