Skip to main content
Glama

create_page

Add a new page to a BookStack wiki by specifying content in HTML or Markdown format, organizing it within books or chapters, and applying tags for categorization.

Instructions

Create a new page in a book or chapter

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
book_idNoParent book ID (required if not in chapter)
chapter_idNoParent chapter ID (required if not directly in book)
nameYesPage name (required, max 255 chars)
htmlNoPage content in HTML format
markdownNoPage content in Markdown format
tagsNoArray of tags with name and value
priorityNoPage priority/order

Implementation Reference

  • Handler logic for the 'create_page' tool: validates input using CreatePageSchema, processes tags, calls BookStackClient.createPage, and returns formatted response.
    case "create_page": {
      const validatedData = CreatePageSchema.parse(args);
      const data = {
        ...validatedData,
        tags: convertTags(validatedData.tags),
      };
      const result = await client.createPage(data);
      return formatApiResponse(result);
    }
  • Zod validation schema (CreatePageSchema) used in the handler to parse and validate tool arguments.
    export const CreatePageSchema = z
      .object({
        book_id: z.number().optional(),
        chapter_id: z.number().optional(),
        name: z.string().min(1).max(255),
        html: z.string().optional(),
        markdown: z.string().optional(),
        tags: z.array(TagSchema).optional(),
        priority: z.number().optional(),
      })
      .refine((data) => data.book_id || data.chapter_id, {
        message: "Either book_id or chapter_id must be provided",
      })
      .refine((data) => data.html || data.markdown, {
        message: "Either html or markdown content must be provided",
      });
  • MCP Tool registration object for 'create_page', including name, description, and JSON inputSchema, returned by createContentTools().
    name: "create_page",
    description: "Create a new page in a book or chapter",
    inputSchema: {
      type: "object",
      properties: {
        book_id: {
          type: "number",
          description: "Parent book ID (required if not in chapter)",
        },
        chapter_id: {
          type: "number",
          description: "Parent chapter ID (required if not directly in book)",
        },
        name: {
          type: "string",
          description: "Page name (required, max 255 chars)",
        },
        html: { type: "string", description: "Page content in HTML format" },
        markdown: {
          type: "string",
          description: "Page content in Markdown format",
        },
        tags: {
          type: "array",
          description: "Array of tags with name and value",
          items: {
            type: "object",
            properties: {
              name: { type: "string" },
              value: { type: "string" },
              order: { type: "number" },
            },
            required: ["name", "value"],
          },
        },
        priority: { type: "number", description: "Page priority/order" },
      },
      required: ["name"],
    },
  • src/index.ts:76-100 (registration)
    Registration of 'create_page' in the dispatch array contentToolNames, used to route calls to handleContentTool.
    const contentToolNames = [
      "list_books",
      "get_book",
      "create_book",
      "update_book",
      "delete_book",
      "export_book",
      "list_chapters",
      "get_chapter",
      "create_chapter",
      "update_chapter",
      "delete_chapter",
      "export_chapter",
      "list_pages",
      "get_page",
      "create_page",
      "update_page",
      "delete_page",
      "export_page",
      "list_shelves",
      "get_shelf",
      "create_shelf",
      "update_shelf",
      "delete_shelf",
    ];
  • BookStackClient helper method that makes the actual API POST request to create a page.
    async createPage(data: CreatePageRequest): Promise<Page> {
      return this.post<Page>("/pages", data);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates something but doesn't mention permissions needed, whether the operation is idempotent, what happens on failure, or what the return value might be. For a creation tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without any fluff. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with 7 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what happens after creation, error conditions, or how it differs from similar tools. The agent would need to guess about behavioral aspects and output format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds no additional parameter information beyond implying the hierarchical relationship ('in a book or chapter'), which aligns with the schema's book_id/chapter_id parameters. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new page in a book or chapter'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'create_chapter' or 'create_book' beyond the resource type, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'create_chapter' or 'update_page'. There's no mention of prerequisites (e.g., needing a book or chapter first) or exclusions, leaving the agent to infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/lautarobarba/bookstack_mcp_server'

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