delete_issue
Remove issues from Backlog project management by specifying either the issue ID or issue key. This tool permanently deletes issues to help maintain organized project workflows.
Instructions
Deletes an issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | No | The numeric ID of the issue (e.g., 12345) | |
| issueKey | No | The key of the issue (e.g., 'PROJ-123') |
Implementation Reference
- src/tools/deleteIssue.ts:26-46 (handler)Full implementation of the 'delete_issue' tool factory, defining name, input/output schemas, description, and the handler logic that resolves the issue identifier and calls the Backlog API to delete it.export const deleteIssueTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof deleteIssueSchema>, (typeof IssueSchema)['shape'] > => { return { name: 'delete_issue', description: t('TOOL_DELETE_ISSUE_DESCRIPTION', 'Deletes an issue'), schema: z.object(deleteIssueSchema(t)), outputSchema: IssueSchema, handler: async ({ issueId, issueKey }) => { const result = resolveIdOrKey('issue', { id: issueId, key: issueKey }, t); if (!result.ok) { throw result.error; } return backlog.deleteIssue(result.value); }, }; };
- src/tools/deleteIssue.ts:8-24 (schema)Input schema definition for the delete_issue tool, supporting either issue ID (number) or issue key (string).const deleteIssueSchema = buildToolSchema((t) => ({ issueId: z .number() .optional() .describe( t( 'TOOL_DELETE_ISSUE_ISSUE_ID', 'The numeric ID of the issue (e.g., 12345)' ) ), issueKey: z .string() .optional() .describe( t('TOOL_GET_ISSUE_ISSUE_KEY', "The key of the issue (e.g., 'PROJ-123')") ), }));
- src/tools/tools.ts:98-98 (registration)Registration of the delete_issue tool within the 'issue' toolset group in the allTools function.deleteIssueTool(backlog, helper),
- src/tools/tools.ts:12-12 (registration)Import of the delete_issue tool for registration.import { deleteIssueTool } from './deleteIssue.js';