backlog_update_wiki
Update a wiki page's content, title, or email notification settings using the Backlog Wiki API. Simplify collaboration and documentation management within projects.
Instructions
Update an wiki using the Backlog Wiki API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | Content | |
| mailNotify | No | True make to notify by Email | |
| name | No | Page Name | |
| wikiId | Yes | Wiki page ID |
Implementation Reference
- src/tools/handlers.ts:374-406 (handler)The main handler function for the 'backlog_update_wiki' tool. Validates input using UpdateWikiParamsSchema and calls wikiService.updateWiki to perform the operation.const handleUpdateWiki: ToolHandler = async (args) => { try { try { const validatedParams = UpdateWikiParamsSchema.parse(args); const text = await wikiService.updateWiki(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:197-202 (schema)Zod schema defining the input parameters for the backlog_update_wiki tool.export const UpdateWikiParamsSchema = z.object({ wikiId: z.number().int().describe("Wiki page ID"), name: z.string().optional().describe("Page Name"), content: z.string().optional().describe("Content"), mailNotify: z.boolean().optional().describe("True make to notify by Email"), });
- src/tools/handlers.ts:442-455 (registration)Registration mapping tool name 'backlog_update_wiki' to its handler function handleUpdateWiki.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:589-593 (schema)MCP tool definition for 'backlog_update_wiki' with name, description, and input schema.export const UPDATE_WIKI_TOOL: Tool = createTool( "backlog_update_wiki", "Update an wiki using the Backlog Wiki API.", UpdateWikiParamsSchema, );
- src/api/backlogApi.ts:205-215 (helper)Core implementation making the PATCH API request to update the wiki page in Backlog.async updateWiki(params: UpdateWikiParams): Promise<string> { const data = await this.request<BacklogWiki>( `/wikis/${params.wikiId}`, { ...params, wikiId: undefined }, "PATCH", { "Content-Type": "application/x-www-form-urlencoded", }, ); return JSON.stringify(data, null, 2); }