delete_issue
Remove an issue from Backlog by specifying its ID or key. This tool enables efficient issue management through direct API integration with Backlog project resources.
Instructions
Deletes an issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueIdOrKey | Yes | Issue ID or issue key |
Implementation Reference
- src/tools/deleteIssue.ts:26-46 (handler)The main handler implementation for the 'delete_issue' tool. It defines the tool object including the async handler function that resolves the issue identifier and delegates to the Backlog library's deleteIssue method.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 for the delete_issue tool, defining optional issueId (number) or issueKey (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:93-93 (registration)Registration of the delete_issue tool within the 'issue' toolset group in the central tools exporter.deleteIssueTool(backlog, helper),