delete_ticket
Remove a specific Jira ticket using its issue ID or key via the Jira REST API endpoint /rest/api/3/issue/{issueIdOrKey}. Input the ticket identifier to delete.
Instructions
Delete a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}. Do not use markdown in your query.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueIdOrKey | Yes | The issue id or key |
Implementation Reference
- src/index.ts:562-576 (handler)The core handler function that executes the DELETE request to the Jira API endpoint /rest/api/3/issue/{issueIdOrKey} to delete the ticket, handling errors by returning the error response.async function deleteTicket(issueIdOrKey: string): Promise<any> { try { const response = await axios.delete( `${JIRA_URL}/rest/api/3/issue/${issueIdOrKey}`, { headers: getAuthHeaders().headers, }, ); return response.data; } catch (error: any) { return { error: error.response.data, }; } }
- src/index.ts:141-155 (registration)Registration of the 'delete_ticket' tool in the ListToolsRequestSchema handler, providing name, description, and input schema requiring 'issueIdOrKey'.{ name: 'delete_ticket', description: 'Delete a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}. Do not use markdown in your query.', inputSchema: { type: 'object', properties: { issueIdOrKey: { type: 'string', description: 'The issue id or key', }, }, required: ['issueIdOrKey'], }, },
- src/index.ts:820-837 (handler)The dispatch handler in the CallToolRequestSchema that validates input, calls the deleteTicket function, and formats the response as MCP content.case 'delete_ticket': { const issueIdOrKey: any = request.params.arguments?.issueIdOrKey; if (!issueIdOrKey) { throw new Error('Issue id or key is required'); } const response = await deleteTicket(issueIdOrKey); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2), }, ], }; }
- src/index.ts:145-154 (schema)Input schema definition for the delete_ticket tool, specifying the required 'issueIdOrKey' string parameter.inputSchema: { type: 'object', properties: { issueIdOrKey: { type: 'string', description: 'The issue id or key', }, }, required: ['issueIdOrKey'], },