create_page
Add new wiki pages to Wizzypedia by providing title and content through the MCP server.
Instructions
Create a new wiki page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the new page | |
| content | Yes | Wiki content for the new page | |
| summary | No | Edit summary | Created via MCP |
Implementation Reference
- index.ts:400-419 (handler)Core handler function in MediaWikiClient that executes the page creation by calling the MediaWiki 'edit' API with 'createonly=true'.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" ); }
- index.ts:712-742 (handler)MCP server tool call handler (switch case) for 'create_page' that parses input arguments, calls the wikiClient.createPage, and formats the JSON response.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)Input schema and metadata definition for the 'create_page' tool.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 'create_page' tool by including CREATE_PAGE_TOOL in the list returned by the ListToolsRequestSchema handler.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ SEARCH_PAGES_TOOL, READ_PAGE_TOOL, CREATE_PAGE_TOOL, UPDATE_PAGE_TOOL, GET_PAGE_HISTORY_TOOL, GET_CATEGORIES_TOOL ] }));