Skip to main content
Glama

get_shelf

Retrieve details of a specific shelf and its books from BookStack wiki instances using the shelf ID.

Instructions

Get details of a specific shelf including its books

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesShelf ID

Implementation Reference

  • Handler logic for the 'get_shelf' tool: parses the shelf ID from arguments and calls the BookStack client's getShelf method, then formats the API response.
    case "get_shelf": { const id = parseInteger(args.id); const result = await client.getShelf(id); return formatApiResponse(result); }
  • Input schema definition for the 'get_shelf' tool, specifying the required 'id' parameter as a number.
    { 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"], }, },
  • Core helper function in BookStackClient that performs the API GET request to retrieve a 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)
    Registration of content tools (including 'get_shelf') into the MCP server's allTools list, which is returned in listTools handler.
    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