Skip to main content
Glama

edit_ticket

Update Jira ticket details, including summary, description, labels, and parent key, via the /rest/api/3/issue/{issueIdOrKey} API. Simplify ticket management with structured input fields.

Instructions

Edit a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}. Do not use markdown in any field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoThe description of the ticket
issueIdOrKeyYesThe issue id or key
labelsNoThe labels of the ticket
parentNoThe key of the parent ticket (the epic)
summaryNoThe summary of the ticket

Implementation Reference

  • The core handler function that performs the PUT request to edit a Jira ticket with summary, description, labels, and parent.
    async function editTicket( issueIdOrKey?: string, summary?: string, description?: string, labels?: string[], parent?: string, ): Promise<any> { try { const descriptionToSend = description || 'No description provided'; const jiraDescription = description === null ? undefined : { type: 'doc', version: 1, content: [ { type: 'paragraph', content: [ { type: 'text', text: descriptionToSend, }, ], }, ], }; const parentToSend = parent ? { key: parent } : undefined; //we create the fields object with only the present fields let fields: any = { summary: summary, labels: labels, parent: parentToSend, }; if (description) { fields['description'] = jiraDescription; } const response = await axios.put( `${JIRA_URL}/rest/api/3/issue/${issueIdOrKey}`, { fields: fields, }, { headers: getAuthHeaders().headers, }, ); return response.data; } catch (error: any) { return { error: error.response.data, }; } }
  • The input schema and description for the edit_ticket tool.
    name: 'edit_ticket', description: 'Edit a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}. Do not use markdown in any field.', inputSchema: { type: 'object', properties: { issueIdOrKey: { type: 'string', description: 'The issue id or key', }, summary: { type: 'string', description: 'The summary of the ticket', }, description: { type: 'string', description: 'The description of the ticket', }, labels: { type: 'array', items: { type: 'string', }, description: 'The labels of the ticket', }, parent: { type: 'string', description: 'The key of the parent ticket (the epic)', }, }, required: ['issueIdOrKey'], },
  • src/index.ts:839-866 (registration)
    The dispatch case in the MCP tool request handler that calls the editTicket function and returns the response.
    case 'edit_ticket': const issueIdOrKey: any = request.params.arguments?.issueIdOrKey; const summary: any = request.params.arguments?.summary; const description: any = request.params.arguments?.description; const labels: any = request.params.arguments?.labels; const parent: any = request.params.arguments?.parent; if (!issueIdOrKey) { throw new Error('Issue id or key is required'); } const response = await editTicket( issueIdOrKey, summary, description, labels, parent, ); return { content: [ { type: 'text', text: JSON.stringify(response, 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