Skip to main content
Glama

create_issue

Create a new JIRA issue by specifying project key, issue type, summary, description, and additional fields to track work items.

Instructions

Create a new JIRA issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesThe project key where the issue will be created
issueTypeYesThe type of issue to create (e.g., "Bug", "Story", "Task")
summaryYesThe issue summary/title
descriptionNoThe issue description
fieldsNoAdditional fields to set on the issue

Implementation Reference

  • MCP CallToolRequest handler case for 'create_issue': validates input parameters and delegates to JiraApiService.createIssue method, returning the created issue as JSON text content.
    case "create_issue": { // Basic validation if ( !args.projectKey || typeof args.projectKey !== "string" || !args.issueType || typeof args.issueType !== "string" || !args.summary || typeof args.summary !== "string" ) { throw new McpError( ErrorCode.InvalidParams, "projectKey, issueType, and summary are required", ); } const response = await this.jiraApi.createIssue( args.projectKey, args.issueType, args.summary, args.description as string | undefined, args.fields as Record<string, any> | undefined, ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2) }, ], }; }
  • Input schema definition for the 'create_issue' tool, specifying required fields (projectKey, issueType, summary) and optional fields (description, fields).
    inputSchema: { type: "object", properties: { projectKey: { type: "string", description: "The project key where the issue will be created", }, issueType: { type: "string", description: 'The type of issue to create (e.g., "Bug", "Story", "Task")', }, summary: { type: "string", description: "The issue summary/title", }, description: { type: "string", description: "The issue description", }, fields: { type: "object", description: "Additional fields to set on the issue", additionalProperties: true, }, }, required: ["projectKey", "issueType", "summary"], additionalProperties: false, },
  • src/index.ts:131-163 (registration)
    Tool registration in ListTools response: defines name, description, and inputSchema for 'create_issue'.
    { name: "create_issue", description: "Create a new JIRA issue", inputSchema: { type: "object", properties: { projectKey: { type: "string", description: "The project key where the issue will be created", }, issueType: { type: "string", description: 'The type of issue to create (e.g., "Bug", "Story", "Task")', }, summary: { type: "string", description: "The issue summary/title", }, description: { type: "string", description: "The issue description", }, fields: { type: "object", description: "Additional fields to set on the issue", additionalProperties: true, }, }, required: ["projectKey", "issueType", "summary"], additionalProperties: false, }, },
  • Core implementation of issue creation: constructs payload with project, summary, issue type, optional description/fields, and performs POST request to JIRA REST API /rest/api/3/issue.
    async createIssue( projectKey: string, issueType: string, summary: string, description?: string, fields?: Record<string, any> ): Promise<{ id: string; key: string }> { const payload = { fields: { project: { key: projectKey, }, summary, issuetype: { name: issueType, }, ...(description && { description }), ...fields, }, }; return this.fetchJson<{ id: string; key: string }>("/rest/api/3/issue", { method: "POST", body: JSON.stringify(payload), }); }

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/cosmix/jira-mcp'

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