Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

create_issue

Create new issues in Bitbucket Cloud repositories to track bugs, enhancements, proposals, or tasks with specified titles, descriptions, types, and priorities.

Instructions

Create a new issue in a repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
titleYesIssue title
contentNoIssue content/description
kindNoIssue type
priorityNoPriority level
assigneeNoAssignee UUID

Implementation Reference

  • Main handler for the create_issue tool in ToolHandler.handleTool method. Parses input using Zod schema and delegates to IssuesAPI.create.
    case 'create_issue': { const params = toolSchemas.create_issue.parse(args); return this.issues.create(params); }
  • Zod input schema for create_issue tool used for validation 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'), }),
  • Registration of the create_issue tool in the toolDefinitions array, including name, description, and JSON inputSchema for MCP.
    { 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'], }, },
  • IssuesAPI.create method that constructs the request body and makes 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); }
  • TypeScript interface defining CreateIssueParams used in API and tool.
    export interface CreateIssueParams { workspace: string; repo_slug: string; title: string; content?: string; kind?: 'bug' | 'enhancement' | 'proposal' | 'task'; priority?: 'trivial' | 'minor' | 'major' | 'critical' | 'blocker'; assignee?: string; }

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