Skip to main content
Glama

list_books

Retrieve a paginated listing of books available to the user from a BookStack wiki instance, with options to sort results and control page size.

Instructions

Get a listing of books visible to the user

Input Schema

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

Implementation Reference

  • The handler function for the 'list_books' tool. It parses the input arguments using PaginationSchema, fetches the list of books using the BookStack client, and formats the API response.
    case "list_books": { const params = PaginationSchema.parse(args); const result = await client.getBooks(params); return formatApiResponse(result.data, result.total); }
  • The schema definition for the 'list_books' tool, specifying the input schema with optional pagination parameters (page, count, sort).
    name: "list_books", description: "Get a listing of books 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:56-59 (registration)
    Registers the 'list_books' tool by including the output of createContentTools (which defines list_books) in the full list of tools provided to the MCP server.
    const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];
  • src/index.ts:124-126 (registration)
    Routes calls to 'list_books' (included in contentToolNames) to the handleContentTool function for execution.
    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