Skip to main content
Glama

list_chapters

Retrieve a paginated listing of chapters from BookStack wiki instances to view and manage chapter content with customizable sorting options.

Instructions

Get a listing of chapters visible to the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination
countNoNumber of items per page
sortNoSort parameter

Implementation Reference

  • The execution logic for the 'list_chapters' tool. Parses arguments with PaginationSchema, calls BookStackClient.getChapters, and formats the response.
    case "list_chapters": {
      const params = PaginationSchema.parse(args);
      const result = await client.getChapters(params);
      return formatApiResponse(result.data, result.total);
    }
  • Tool definition object for 'list_chapters' including its name, description, and input JSON Schema.
    {
      name: "list_chapters",
      description: "Get a listing of chapters visible to the user",
      inputSchema: {
        type: "object",
        properties: {
          page: { type: "number", description: "Page number for pagination" },
          count: { type: "number", description: "Number of items per page" },
          sort: { type: "string", description: "Sort parameter" },
        },
      },
    },
  • src/index.ts:57-59 (registration)
    Registers the 'list_chapters' tool (via createContentTools) into the allTools array provided to the MCP server's listTools handler.
      ...createContentTools(bookStackClient),
      ...createSearchAndUserTools(bookStackClient),
    ];
  • src/index.ts:124-126 (registration)
    Routes calls to 'list_chapters' (listed in contentToolNames at line 83) to the handleContentTool function.
    if (contentToolNames.includes(name)) {
      result = await handleContentTool(name, args, bookStackClient);
    } else if (searchUserToolNames.includes(name)) {

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