Skip to main content
Glama

get_book

Retrieve detailed information about a specific book from BookStack, including its content structure and organization, by providing the book ID.

Instructions

Get details of a specific book including its content structure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesBook ID

Implementation Reference

  • MCP tool handler implementation for get_book: parses the book ID from input arguments, invokes BookStackClient.getBook(id), and returns a formatted API response.
    case "get_book": { const id = parseInteger(args.id); const result = await client.getBook(id); return formatApiResponse(result); }
  • Input schema for the get_book tool, defining a required numeric 'id' property for the Book ID.
    name: "get_book", description: "Get details of a specific book including its content structure", inputSchema: { type: "object", properties: { id: { type: "number", description: "Book ID" }, }, required: ["id"], }, },
  • Core helper method in BookStackClient that performs the HTTP GET request to fetch book details by ID from the BookStack API.
    async getBook(id: number): Promise<Book> { const response: AxiosResponse<Book> = await this.api.get(`/books/${id}`); return response.data; }
  • src/index.ts:124-126 (registration)
    Registration and dispatch logic in the MCP server request handler: checks if tool name is in contentToolNames (which includes "get_book") and routes to handleContentTool.
    if (contentToolNames.includes(name)) { result = await handleContentTool(name, args, bookStackClient); } else if (searchUserToolNames.includes(name)) {
  • src/index.ts:56-59 (registration)
    Tool registration: creates the list of available tools by spreading createContentTools (which defines get_book schema) into allTools, used for ListToolsRequest.
    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