Skip to main content
Glama

jira_create_issue_advanced

Create detailed Jira issues with comprehensive field support including fixVersions, components, and custom fields. Use jira_get_create_meta first to discover required fields and allowed values for accurate issue creation.

Instructions

Create a new Jira issue with full field support including fixVersions, components, and custom fields. Use jira_get_create_meta first to discover required fields and allowed values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesProject key
summaryYesIssue summary
issueTypeYesIssue type (e.g., Bug, Task, Story)
descriptionNoIssue description
priorityNoPriority name
assigneeNoAssignee username
reporterNoReporter username
labelsNoLabels
componentsNoComponent names
fixVersionsNoFix version names
affectsVersionsNoAffects version names
customFieldsNoCustom fields as key-value pairs (e.g., {"customfield_10001": "value"})

Implementation Reference

  • MCP tool handler for jira_create_issue_advanced: validates input with schema, constructs fields object handling optional fields like components, versions, customFields, and calls jiraClient.createIssueRaw to create the issue
    case "jira_create_issue_advanced": { const { projectKey, summary, issueType, description, priority, assignee, reporter, labels, components, fixVersions, affectsVersions, customFields, } = CreateIssueAdvancedSchema.parse(args); const fields: Record<string, unknown> = { project: { key: projectKey }, summary, issuetype: { name: issueType }, }; if (description) fields.description = description; if (priority) fields.priority = { name: priority }; if (assignee) fields.assignee = { name: assignee }; if (reporter) fields.reporter = { name: reporter }; if (labels) fields.labels = labels; if (components) fields.components = components.map((name) => ({ name })); if (fixVersions) fields.fixVersions = fixVersions.map((name) => ({ name })); if (affectsVersions) fields.versions = affectsVersions.map((name) => ({ name })); // Merge custom fields if (customFields) { Object.assign(fields, customFields); } const issue = await jiraClient.createIssueRaw(fields); return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }], }; }
  • Zod input schema validation for jira_create_issue_advanced tool parameters
    const CreateIssueAdvancedSchema = 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"), reporter: z.string().optional().describe("Reporter username"), labels: z.array(z.string()).optional().describe("Labels"), components: z.array(z.string()).optional().describe("Component names"), fixVersions: z.array(z.string()).optional().describe("Fix version names"), affectsVersions: z .array(z.string()) .optional() .describe("Affects version names"), customFields: z .record(z.unknown()) .optional() .describe( 'Custom fields as key-value pairs (e.g., {"customfield_10001": "value"})' ), });
  • src/index.ts:555-600 (registration)
    Tool registration in ListTools handler including name, description, and inputSchema
    { name: "jira_create_issue_advanced", description: "Create a new Jira issue with full field support including fixVersions, components, and custom fields. Use jira_get_create_meta first to discover required fields and allowed values.", 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" }, reporter: { type: "string", description: "Reporter username" }, labels: { type: "array", items: { type: "string" }, description: "Labels", }, components: { type: "array", items: { type: "string" }, description: "Component names", }, fixVersions: { type: "array", items: { type: "string" }, description: "Fix version names", }, affectsVersions: { type: "array", items: { type: "string" }, description: "Affects version names", }, customFields: { type: "object", description: 'Custom fields as key-value pairs (e.g., {"customfield_10001": "value"})', }, }, required: ["projectKey", "summary", "issueType"], }, },
  • JiraClient helper method that performs the raw POST /issue API call used by the advanced create issue handler
    async createIssueRaw(fields: Record<string, unknown>): Promise<JiraIssue> { return this.request<JiraIssue>("/issue", { method: "POST", body: JSON.stringify({ fields }), }); }

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/yogeshhrathod/JiraMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server