update_wiki
Modify an existing wiki page by updating its name, content, or notification settings using its wiki ID.
Instructions
Updates an existing wiki page
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wikiId | Yes | Wiki ID | |
| name | No | Name of the wiki page | |
| content | No | Content of the wiki page | |
| mailNotify | No | Whether to send notification emails (default: false) | |
| organization | No | Optional organization name. Use list_organizations to inspect available organizations. |
Implementation Reference
- src/tools/updateWiki.ts:30-56 (handler)Main handler function for the update_wiki tool. Receives backlog client and translation helper, returns a ToolDefinition with the handler that calls backlog.patchWiki() to update an existing wiki page.
export const updateWikiTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof updateWikiSchema>, (typeof WikiSchema)['shape'] > => { return { name: 'update_wiki', description: t( 'TOOL_UPDATE_WIKI_DESCRIPTION', 'Updates an existing wiki page' ), schema: z.object(updateWikiSchema(t)), outputSchema: WikiSchema, importantFields: ['id', 'name', 'content', 'updatedUser'], handler: async ({ wikiId, name, content, mailNotify }) => { const wikiIdNumber = typeof wikiId === 'string' ? parseInt(wikiId, 10) : wikiId; return backlog.patchWiki(wikiIdNumber, { name, content, mailNotify, }); }, }; - src/tools/updateWiki.ts:7-28 (schema)Input schema for update_wiki: wikiId (required, string or number), name (optional string), content (optional string), mailNotify (optional boolean).
const updateWikiSchema = buildToolSchema((t) => ({ wikiId: z .union([z.string(), z.number()]) .describe(t('TOOL_UPDATE_WIKI_ID', 'Wiki ID')), name: z .string() .optional() .describe(t('TOOL_UPDATE_WIKI_NAME', 'Name of the wiki page')), content: z .string() .optional() .describe(t('TOOL_UPDATE_WIKI_CONTENT', 'Content of the wiki page')), mailNotify: z .boolean() .optional() .describe( t( 'TOOL_UPDATE_WIKI_MAIL_NOTIFY', 'Whether to send notification emails (default: false)' ) ), })); - src/tools/tools.ts:125-136 (registration)Registration of updateWikiTool in the 'wiki' toolset. It is listed as one of the wiki-related tools.
{ name: 'wiki', description: 'Tools for managing wiki pages.', enabled: false, tools: [ getWikiPagesTool(backlog, helper), getWikisCountTool(backlog, helper), getWikiTool(backlog, helper), addWikiTool(backlog, helper), updateWikiTool(backlog, helper), ], },