Skip to main content
Glama

list_books

Retrieve a paginated list of books available in BookStack, with options to sort results and control display count for efficient content browsing.

Instructions

Get a listing of books visible to the user

Input Schema

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

Implementation Reference

  • The handler case for 'list_books' that validates input with PaginationSchema, calls client.getBooks(params), and formats the paginated response using formatApiResponse.
    case "list_books": {
      const params = PaginationSchema.parse(args);
      const result = await client.getBooks(params);
      return formatApiResponse(result.data, result.total);
    }
  • Tool metadata and input schema definition for 'list_books', specifying optional pagination parameters.
    {
      name: "list_books",
      description: "Get a listing of books 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" },
        },
      },
    },
  • Zod validation schema for pagination parameters used in the list_books handler.
    export const PaginationSchema = z
      .object({
        page: z.number().optional(),
        count: z.number().optional(),
        sort: z.string().optional(),
      })
      .optional();
  • src/index.ts:56-59 (registration)
    Incorporates the list_books tool (via createContentTools) into the complete list of tools advertised to the MCP client via listTools.
    const allTools: Tool[] = [
      ...createContentTools(bookStackClient),
      ...createSearchAndUserTools(bookStackClient),
    ];
  • src/index.ts:124-127 (registration)
    Dispatch logic in callTool handler that routes 'list_books' calls (as part of contentToolNames) to the appropriate handleContentTool function.
    if (contentToolNames.includes(name)) {
      result = await handleContentTool(name, args, bookStackClient);
    } else if (searchUserToolNames.includes(name)) {
      result = await handleSearchAndUserTool(name, args, bookStackClient);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a listing, implying a read-only operation, but doesn't cover critical aspects like pagination behavior (implied by parameters but not explained), rate limits, authentication needs, or what 'visible to the user' entails (e.g., permissions). For a list tool with zero annotation coverage, this leaves significant 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 front-loads the core purpose ('Get a listing of books') and adds a useful qualifier ('visible to the user'). There is no wasted verbiage or redundancy, making it highly concise and well-structured for quick understanding.

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?

Given the tool's complexity (a list operation with pagination/sorting) and lack of annotations and output schema, the description is incomplete. It doesn't explain the return format, pagination behavior, or how 'visible to the user' affects results. For a tool with three parameters and no structured output info, more context is needed to guide effective use.

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?

The input schema has 100% description coverage, with clear documentation for 'page', 'count', and 'sort'. The description adds no parameter-specific information beyond implying a listing operation. According to scoring rules, with high schema coverage (>80%), the baseline is 3 even without param details in the description, which applies here.

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 tool's purpose with a specific verb ('Get') and resource ('listing of books'), making it immediately understandable. It adds the scope 'visible to the user', which distinguishes it from potentially unfiltered listings. However, it doesn't explicitly differentiate from sibling tools like 'search_all' or 'get_book', which could provide similar book-related data.

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. It doesn't mention sibling tools like 'search_all' (which might offer filtering) or 'get_book' (for single books), nor does it specify prerequisites or contexts for use. The agent must infer usage from the tool name and description 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