jira_create_issue
Create new Jira issues by specifying project, summary, issue type, description, priority, assignee, and labels to track tasks, bugs, or stories in your workflow.
Instructions
Create a new Jira issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectKey | Yes | Project key | |
| summary | Yes | Issue summary | |
| issueType | Yes | Issue type (e.g., Bug, Task, Story) | |
| description | No | Issue description | |
| priority | No | Priority name | |
| assignee | No | Assignee username | |
| labels | No | Labels |
Implementation Reference
- src/index.ts:949-973 (handler)MCP tool handler: validates input parameters using CreateIssueSchema, constructs the issue creation payload, calls jiraClient.createIssue, and returns the created issue as JSON.case "jira_create_issue": { const { projectKey, summary, issueType, description, priority, assignee, labels, } = CreateIssueSchema.parse(args); const issue = await jiraClient.createIssue({ fields: { project: { key: projectKey }, summary, issuetype: { name: issueType }, ...(description && { description }), ...(priority && { priority: { name: priority } }), ...(assignee && { assignee: { name: assignee } }), ...(labels && { labels }), }, }); return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }], }; }
- src/index.ts:251-274 (registration)Tool registration: defines the tool name, description, and input schema in the ListTools response.{ name: "jira_create_issue", description: "Create a new Jira issue", inputSchema: { type: "object", properties: { projectKey: { type: "string", description: "Project key" }, summary: { type: "string", description: "Issue summary" }, issueType: { type: "string", description: "Issue type (e.g., Bug, Task, Story)", }, description: { type: "string", description: "Issue description" }, priority: { type: "string", description: "Priority name" }, assignee: { type: "string", description: "Assignee username" }, labels: { type: "array", items: { type: "string" }, description: "Labels", }, }, required: ["projectKey", "summary", "issueType"], }, },
- src/index.ts:52-60 (schema)Zod input validation schema matching the tool's inputSchema, used to parse arguments in the handler.const CreateIssueSchema = z.object({ projectKey: z.string().describe("Project key"), summary: z.string().describe("Issue summary"), issueType: z.string().describe("Issue type (e.g., Bug, Task, Story)"), description: z.string().optional().describe("Issue description"), priority: z.string().optional().describe("Priority name"), assignee: z.string().optional().describe("Assignee username"), labels: z.array(z.string()).optional().describe("Labels"), });
- src/jira-client.ts:57-62 (helper)JiraClient helper method: sends POST request to /rest/api/2/issue endpoint to create the issue.async createIssue(data: JiraCreateIssueRequest): Promise<JiraIssue> { return this.request<JiraIssue>("/issue", { method: "POST", body: JSON.stringify(data), }); }
- src/types.ts:97-108 (schema)TypeScript type definition for the createIssue request payload used by the JiraClient.export interface JiraCreateIssueRequest { fields: { project: { key: string }; summary: string; description?: string; issuetype: { name: string }; priority?: { name: string }; assignee?: { name: string }; labels?: string[]; [key: string]: unknown; }; }