Skip to main content
Glama

list_attachments

Retrieve a paginated list of file attachments from a BookStack wiki instance to manage and organize uploaded documents and media.

Instructions

Get a listing of attachments

Input Schema

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

Implementation Reference

  • The handler function for the 'list_attachments' tool. Parses pagination arguments, fetches attachments using the BookStackClient, and formats the response.
    case "list_attachments": {
      const params = PaginationSchema.parse(args);
      const result = await client.getAttachments(params);
      return formatApiResponse(result.data, result.total);
    }
  • Input schema definition for the 'list_attachments' tool, supporting optional pagination parameters.
    {
      name: "list_attachments",
      description: "Get a listing of attachments",
      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)
    Registration of the 'list_attachments' tool by including it in the complete list of tools provided to the MCP server via createSearchAndUserTools.
    const allTools: Tool[] = [
      ...createContentTools(bookStackClient),
      ...createSearchAndUserTools(bookStackClient),
    ];
  • src/index.ts:124-128 (registration)
    Dispatch logic in the MCP CallToolRequest handler that routes 'list_attachments' calls to the appropriate handleSearchAndUserTool function.
    if (contentToolNames.includes(name)) {
      result = await handleContentTool(name, args, bookStackClient);
    } else if (searchUserToolNames.includes(name)) {
      result = await handleSearchAndUserTool(name, args, bookStackClient);
    } else {

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