Skip to main content
Glama

create_book

Add a new book to your BookStack wiki by specifying its name, description, and optional tags or templates for organized content management.

Instructions

Create a new book in the system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesBook name (required, max 255 chars)
descriptionNoBook description (plain text)
description_htmlNoBook description (HTML format)
tagsNoArray of tags with name and value
default_template_idNoDefault template ID for new pages

Implementation Reference

  • Executes the create_book tool: parses args with CreateBookSchema, converts tags, calls BookStackClient.createBook, and returns formatted response.
    case "create_book": {
      const validatedData = CreateBookSchema.parse(args);
      const data = {
        ...validatedData,
        tags: convertTags(validatedData.tags),
      };
      const result = await client.createBook(data);
      return formatApiResponse(result);
    }
  • MCP Tool object registration for 'create_book' including name, description, and input schema definition.
    {
      name: "create_book",
      description: "Create a new book in the system",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Book name (required, max 255 chars)",
          },
          description: {
            type: "string",
            description: "Book description (plain text)",
          },
          description_html: {
            type: "string",
            description: "Book description (HTML 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"],
            },
          },
          default_template_id: {
            type: "number",
            description: "Default template ID for new pages",
          },
        },
        required: ["name"],
      },
  • Zod validation schema for create_book input parameters, used in the handler for parsing and validation.
    export const CreateBookSchema = z.object({
      name: z.string().min(1).max(255),
      description: z.string().optional(),
      description_html: z.string().optional(),
      tags: z.array(TagSchema).optional(),
      default_template_id: z.number().optional(),
    });
  • BookStackClient helper method that sends POST request to /books API endpoint to create the book.
    async createBook(data: CreateBookRequest): Promise<Book> {
      return this.post<Book>("/books", data);
    }
  • src/index.ts:56-60 (registration)
    Top-level tool list registration including content tools (which contains create_book) for the MCP server.
    const allTools: Tool[] = [
      ...createContentTools(bookStackClient),
      ...createSearchAndUserTools(bookStackClient),
    ];
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it's a creation operation. It doesn't disclose behavioral traits like authentication requirements, rate limits, whether the operation is idempotent, what happens on duplicate names, or what the response contains. For a mutation tool with zero annotation coverage, this is a significant gap.

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 with zero wasted words. It's appropriately sized for a simple creation tool and front-loads the core action.

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 mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what a 'book' represents in this system, what happens after creation, or any side effects. The agent must rely entirely on the input schema for operational details.

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 fully documents all 5 parameters. The description adds no parameter-specific information beyond implying a 'book' is created. Baseline 3 is appropriate when the schema does all the parameter documentation work.

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

Purpose3/5

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

The description states the basic action ('Create a new book') but is vague about what constitutes a 'book' in this system and doesn't differentiate from sibling tools like 'create_chapter' or 'create_page'. It provides the verb+resource but lacks specificity about the resource's nature or scope.

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?

No guidance is provided on when to use this tool versus alternatives like 'update_book' or 'list_books'. The description doesn't mention prerequisites, constraints, or typical use cases, leaving the agent to infer usage from the tool name 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