Skip to main content
Glama

create_ticket

Create Jira tickets by specifying project, summary, description, and issue type to track tasks, bugs, or features in your workflow.

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
projectYes
summaryYesThe summary of the ticket
descriptionYesThe description of the ticket
issuetypeYes
parentNoThe key of the parent ticket (the epic)

Implementation Reference

  • Core handler function that creates a Jira ticket by making a POST request to /rest/api/3/issue with the provided project key, summary, description (in ADF format), issue type name, and optional parent key.
    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 the MCP tools list, including name, description, and input schema.
    { 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 defining the parameters for the create_ticket tool: project (with key), summary, description, issuetype (with name), 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'], },
  • MCP request handler case for 'create_ticket' that validates arguments and calls the createTicket function, returning the response as text content.
    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), }, ], }; } }

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