create_page
Generate and publish a new wiki page on Wizzypedia by specifying a title, content, and optional summary using MCP-enabled tools.
Instructions
Create a new wiki page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Wiki content for the new page | |
| summary | No | Edit summary | Created via MCP |
| title | Yes | Title of the new page |
Implementation Reference
- index.ts:712-742 (handler)MCP tool handler for 'create_page': extracts arguments from request, calls wikiClient.createPage, formats and returns the result as JSON text content.case "create_page": { const { title, content, summary = "Created via MCP" } = request.params.arguments as { title: string; content: string; summary?: string; }; const result = await wikiClient.createPage(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:501-523 (schema)Tool schema definition for 'create_page' including input schema with title, content (required), and optional summary.const CREATE_PAGE_TOOL: Tool = { name: "create_page", description: "Create a new wiki page", inputSchema: { type: "object", properties: { title: { type: "string", description: "Title of the new page" }, content: { type: "string", description: "Wiki content for the new page" }, summary: { type: "string", description: "Edit summary", default: "Created via MCP" } }, required: ["title", "content"] } };
- index.ts:598-607 (registration)Registers the list of tools including CREATE_PAGE_TOOL in response to ListToolsRequestSchema.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:400-419 (helper)MediaWikiClient method implementing page creation: obtains edit token and makes POST API call with createonly flag.async createPage( 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, createonly: true }, "POST" ); }