Skip to main content
Glama
cryppadotta
by cryppadotta

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
NameRequiredDescriptionDefault
titleYesTitle of the new page
contentYesWiki content for the new page
summaryNoEdit summaryCreated via MCP

Implementation Reference

  • 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"
      );
    }
  • 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
            )
          }
        ]
      };
    }
  • 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
      ]
    }));

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cryppadotta/mcp-wizzypedia'

If you have feedback or need assistance with the MCP directory API, please join our Discord server