Skip to main content
Glama

edit_ticket

Modify Jira tickets by updating summary, description, labels, or parent assignment to keep project tracking current.

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
issueIdOrKeyYesThe issue id or key
summaryNoThe summary of the ticket
descriptionNoThe description of the ticket
labelsNoThe labels of the ticket
parentNoThe key of the parent ticket (the epic)

Implementation Reference

  • The handler function that executes the tool logic: sends a PUT request to Jira API /rest/api/3/issue/{issueIdOrKey} to update ticket fields including summary, description (in ADF format), 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, }; } }
  • Input schema and metadata for the 'edit_ticket' tool, defining parameters and requirements.
    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)
    Tool registration in the CallToolRequestSchema handler: extracts arguments from request and calls the editTicket handler function.
    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