update_page
Modify and update existing wiki pages on Wizzypedia by providing a title, new content, and optional edit summary through the MCP-enabled Wizzypedia MCP Server.
Instructions
Update an existing wiki page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | New wiki content for the page | |
| summary | No | Edit summary | Updated via MCP |
| title | Yes | Title of the page to update |
Implementation Reference
- index.ts:744-774 (handler)MCP server tool call handler for 'update_page': destructures input arguments, calls wikiClient.updatePage, and returns formatted JSON response with edit result.case "update_page": { const { title, content, summary = "Updated via MCP" } = request.params.arguments as { title: string; content: string; summary?: string; }; const result = await wikiClient.updatePage(title, content, summary); return { content: [ { type: "text", text: JSON.stringify( { title, result: result.edit.result, newRevId: result.edit.newrevid, success: result.edit.result === "Success" }, null, 2 ) } ] }; }
- index.ts:525-547 (schema)Tool schema definition including inputSchema with properties for title, content, summary and required fields.const UPDATE_PAGE_TOOL: Tool = { name: "update_page", description: "Update an existing wiki page", inputSchema: { type: "object", properties: { title: { type: "string", description: "Title of the page to update" }, content: { type: "string", description: "New wiki content for the page" }, summary: { type: "string", description: "Edit summary", default: "Updated via MCP" } }, required: ["title", "content"] } };
- index.ts:598-607 (registration)Registration of the update_page tool (UPDATE_PAGE_TOOL) in the MCP server's listTools response.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ SEARCH_PAGES_TOOL, READ_PAGE_TOOL, CREATE_PAGE_TOOL, UPDATE_PAGE_TOOL, GET_PAGE_HISTORY_TOOL, GET_CATEGORIES_TOOL ] }));
- index.ts:421-439 (helper)MediaWikiClient helper method that gets CSRF edit token and makes POST API call to edit/update the page content.async updatePage( title: string, content: string, summary: string = "" ): Promise<any> { // Ensure we have an edit token const token = await this.getEditToken(); return this.makeApiCall( { action: "edit", title, text: content, summary, token }, "POST" ); }