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), ];

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