delete_ticket
Remove a Jira issue permanently by specifying its ID or key to clean up resolved or obsolete tickets.
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)Core handler function that executes the DELETE request to the Jira API to delete the ticket specified by issueIdOrKey.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:142-155 (registration)Registers the 'delete_ticket' tool in the list of available tools, including its description and input schema.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)Dispatch handler in the CallToolRequestHandler that handles calls to 'delete_ticket', validates input, invokes deleteTicket, and formats the response.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' parameter.inputSchema: { type: 'object', properties: { issueIdOrKey: { type: 'string', description: 'The issue id or key', }, }, required: ['issueIdOrKey'], },