Skip to main content
Glama

list_shelves

Retrieve a paginated list of shelves available to the user in BookStack, supporting sorting and page navigation.

Instructions

Get a listing of shelves visible to the user

Input Schema

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

Implementation Reference

  • Executes the list_shelves tool by parsing pagination parameters and fetching shelves from BookStackClient.
    case "list_shelves": {
      const params = PaginationSchema.parse(args);
      const result = await client.getShelves(params);
      return formatApiResponse(result.data, result.total);
    }
  • Defines the input schema and metadata for the list_shelves tool.
    {
      name: "list_shelves",
      description: "Get a listing of shelves 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:124-130 (registration)
    Routes execution of list_shelves (included in contentToolNames) to the content tools handler.
    if (contentToolNames.includes(name)) {
      result = await handleContentTool(name, args, bookStackClient);
    } else if (searchUserToolNames.includes(name)) {
      result = await handleSearchAndUserTool(name, args, bookStackClient);
    } else {
      throw new Error(`Unknown tool: ${name}`);
    }
  • src/index.ts:56-59 (registration)
    Registers the list_shelves tool schema by including it from createContentTools in the MCP server's tool list.
    const allTools: Tool[] = [
      ...createContentTools(bookStackClient),
      ...createSearchAndUserTools(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 'Get a listing' which implies a read-only operation, but doesn't mention pagination behavior (implied by parameters), rate limits, authentication needs, or what 'visible to the user' means in practice. For a tool with no annotations, 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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every word contributing to understanding the core function.

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

Completeness3/5

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

Given no annotations, no output schema, and 100% schema coverage, the description is minimally adequate but incomplete. It covers the basic purpose but lacks details on behavior, usage context, and output format. For a list tool with no annotations, it should do more to compensate for missing structured data.

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 three parameters (page, count, sort) with basic descriptions. The description adds no additional meaning about parameters, such as default values, constraints, or how they interact. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb ('Get') and resource ('listing of shelves'), making the purpose understandable. However, it doesn't distinguish this from other list_* tools (like list_books, list_pages) beyond specifying 'shelves', nor does it clarify what 'visible to the user' entails compared to other tools. This is clear but lacks sibling differentiation.

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 list_books, list_pages, or search_all. It mentions 'visible to the user' but doesn't explain how this differs from other list tools or when to choose one over another. There's no explicit when/when-not or alternative recommendations.

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