Skip to main content
Glama

get_shelf

Retrieve detailed information about a specific BookStack shelf, including its contained books, by providing the shelf ID.

Instructions

Get details of a specific shelf including its books

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesShelf ID

Implementation Reference

  • Handler for the get_shelf tool: parses the input ID and calls BookStackClient.getShelf to retrieve shelf details.
    case "get_shelf": { const id = parseInteger(args.id); const result = await client.getShelf(id); return formatApiResponse(result); }
  • Tool definition including name, description, and input schema that requires a numeric 'id' for the shelf.
    { name: "get_shelf", description: "Get details of a specific shelf including its books", inputSchema: { type: "object", properties: { id: { type: "number", description: "Shelf ID" }, }, required: ["id"], }, },
  • BookStackClient method that performs the API GET request to fetch the specific shelf by ID.
    async getShelf(id: number): Promise<Shelf> { const response: AxiosResponse<Shelf> = await this.api.get(`/shelves/${id}`); return response.data; }
  • src/index.ts:56-59 (registration)
    Registers the get_shelf tool by including it in the allTools list via createContentTools for MCP server.
    const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];
  • src/index.ts:124-126 (registration)
    Routes calls to get_shelf (listed in contentToolNames) to the content tools handler.
    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