backlog_delete_issue
Remove a specific issue by providing its ID or key using the Backlog API. This tool facilitates issue management within projects integrated with the Backlog MCP Server.
Instructions
Delete an issue using the Backlog Issue API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueIdOrKey | Yes | Issue ID or Issue Key |
Implementation Reference
- src/tools/handlers.ts:238-270 (handler)The primary handler function for the 'backlog_delete_issue' tool. It parses the input arguments using DeleteIssueParamsSchema, calls issueService.deleteIssue with the validated parameters, and formats the response or error.const handleDeleteIssue: ToolHandler = async (args) => { try { try { const validatedParams = DeleteIssueParamsSchema.parse(args); const text = await issueService.deleteIssue(validatedParams); return { content: [ { type: "text", text: `Results for your query:\n${text}`, }, ], isError: false, }; } catch (validationError) { throw new ValidationError( `Invalid parameters: ${validationError instanceof Error ? validationError.message : String(validationError)}`, ); } } catch (error) { return { content: [ { type: "text", text: `Error: ${formatError(error)}`, }, ], isError: true, }; } };
- src/tools/handlers.ts:442-455 (registration)Registers the 'backlog_delete_issue' tool name to its corresponding handler function handleDeleteIssue within the toolHandlers map.export const toolHandlers: Record<ToolName, ToolHandler> = { backlog_get_projects: handleGetProjects, backlog_get_project: handleGetProject, backlog_get_issues: handleGetIssues, backlog_get_issue: handleGetIssue, backlog_add_issue: handleAddIssue, backlog_update_issue: handleUpdateIssue, backlog_delete_issue: handleDeleteIssue, backlog_get_wikis: handleGetWikis, backlog_get_wiki: handleGetWiki, backlog_add_wiki: handleAddWiki, backlog_update_wiki: handleUpdateWiki, backlog_delete_wiki: handleDeleteWiki, };
- src/core/schema.ts:177-179 (schema)Zod schema for input validation of the delete issue tool, requiring the issueIdOrKey.export const DeleteIssueParamsSchema = z.object({ issueIdOrKey: z.string().describe("Issue ID or Issue Key"), });
- src/tools/toolDefinitions.ts:564-569 (schema)Defines the MCP Tool specification for 'backlog_delete_issue', including name, description, and input schema converted from DeleteIssueParamsSchema.export const DELETE_ISSUE_TOOL: Tool = createTool( "backlog_delete_issue", "Delete an issue using the Backlog Issue API.", DeleteIssueParamsSchema, );
- src/core/types.ts:150-150 (helper)Includes 'backlog_delete_issue' in the ToolName type union for type safety.| "backlog_delete_issue"