Skip to main content
Glama

create_ticket

Generate and submit a Jira ticket via API by specifying project key, summary, description, issue type, and optional parent ticket key for organization.

Instructions

Create a ticket on Jira on the api /rest/api/3/issue. Do not use markdown in any field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesThe description of the ticket
issuetypeYes
parentNoThe key of the parent ticket (the epic)
projectYes
summaryYesThe summary of the ticket

Implementation Reference

  • MCP server request handler case for 'create_ticket' tool: validates input arguments, calls the createTicket helper function, and returns the JSON response or error.
    case 'create_ticket': { const project: any = request.params.arguments?.project; const summary: any = request.params.arguments?.summary; const description: any = request.params.arguments?.description; const issuetype: any = request.params.arguments?.issuetype; const parent: any = request.params.arguments?.parent; if (!project || !summary || !description || !issuetype) { throw new Error( 'Project, summary, description and issuetype are required', ); } try { const response = await createTicket( project.key, summary, description, issuetype.name, parent, ); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: JSON.stringify(error.response.data, null, 2), }, ], }; } }
  • Helper function implementing the core API call to create a Jira ticket using axios POST to /rest/api/3/issue, formats description as ADF, handles optional parent epic.
    async function createTicket( project: string, summary: string, description: string, issuetype: string, parentID?: string, ): Promise<any> { try { const jiraDescription = { type: 'doc', version: 1, content: [ { type: 'paragraph', content: [ { type: 'text', text: description, }, ], }, ], }; //parent is somethng like "parent": {"key": "SCRUM-19"} const parent = parentID ? { key: parentID } : undefined; const response = await axios.post( `${JIRA_URL}/rest/api/3/issue`, { fields: { project: { key: project, }, summary, description: description ? jiraDescription : undefined, issuetype: { name: issuetype, }, parent, }, }, { headers: getAuthHeaders().headers, }, ); return response.data; } catch (error: any) { return { error: error.response.data, }; } }
  • src/index.ts:81-123 (registration)
    Tool registration in ListToolsRequestSchema handler: defines name 'create_ticket', description, and detailed inputSchema for MCP tool discovery.
    { name: 'create_ticket', description: 'Create a ticket on Jira on the api /rest/api/3/issue. Do not use markdown in any field.', inputSchema: { type: 'object', properties: { project: { type: 'object', properties: { key: { type: 'string', description: 'The project key', }, }, required: ['key'], }, summary: { type: 'string', description: 'The summary of the ticket', }, description: { type: 'string', description: 'The description of the ticket', }, issuetype: { type: 'object', properties: { name: { type: 'string', description: 'The name of the issue type', }, }, required: ['name'], }, parent: { type: 'string', description: 'The key of the parent ticket (the epic)', }, }, required: ['project', 'summary', 'description', 'issuetype'], }, },
  • Input schema definition for the create_ticket tool, specifying required fields like project.key, summary, description, issuetype.name, and optional parent.
    inputSchema: { type: 'object', properties: { project: { type: 'object', properties: { key: { type: 'string', description: 'The project key', }, }, required: ['key'], }, summary: { type: 'string', description: 'The summary of the ticket', }, description: { type: 'string', description: 'The description of the ticket', }, issuetype: { type: 'object', properties: { name: { type: 'string', description: 'The name of the issue type', }, }, required: ['name'], }, parent: { type: 'string', description: 'The key of the parent ticket (the epic)', }, }, required: ['project', 'summary', 'description', 'issuetype'], },

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/KS-GEN-AI/jira-mcp-server'

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