backlog_delete_wiki
Delete a wiki page using the Backlog Wiki API. Specify the wiki ID and optionally enable email notifications for confirmation. Streamlines wiki management within the Backlog MCP Server.
Instructions
Delete an wiki using the Backlog Wiki API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mailNotify | No | True make to notify by Email | |
| wikiId | Yes | Wiki page ID |
Implementation Reference
- src/tools/handlers.ts:408-440 (handler)The handler function for the 'backlog_delete_wiki' tool. It validates input parameters using DeleteWikiParamsSchema, calls wikiService.deleteWiki(), formats the result or error into the expected ToolResponse structure.const handleDeleteWiki: ToolHandler = async (args) => { try { try { const validatedParams = DeleteWikiParamsSchema.parse(args); const text = await wikiService.deleteWiki(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/core/schema.ts:204-207 (schema)Zod schema defining the input parameters for the backlog_delete_wiki tool: wikiId (required integer), mailNotify (optional boolean).export const DeleteWikiParamsSchema = z.object({ wikiId: z.number().int().describe("Wiki page ID"), mailNotify: z.boolean().optional().describe("True make to notify by Email"), });
- src/tools/handlers.ts:442-455 (registration)Registration of the tool handler: maps 'backlog_delete_wiki' to handleDeleteWiki in the toolHandlers record used by the MCP server.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/tools/toolDefinitions.ts:595-599 (registration)Creation of the Tool object for 'backlog_delete_wiki' using createTool, including name, description, and input schema. Exported and included in ALL_TOOLS for registry.export const DELETE_WIKI_TOOL: Tool = createTool( "backlog_delete_wiki", "Delete an wiki using the Backlog Wiki API.", DeleteWikiParamsSchema, );
- src/tools/registry.ts:38-38 (registration)Initialization of the ToolRegistry with ALL_TOOLS, which includes the backlog_delete_wiki tool, making it available to the MCP server.export const toolRegistry = new ToolRegistry(ALL_TOOLS);