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 {
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the action ('Get a listing') without mentioning pagination behavior, rate limits, authentication needs, or what the return format looks like (e.g., list structure, error handling). This leaves significant gaps for a tool that likely returns multiple items.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence ('Get a listing of attachments'), which is front-loaded and wastes no words. Every part of the sentence directly contributes to stating the tool's purpose, making it efficient in structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (listing operation with pagination/sorting) and lack of annotations or output schema, the description is incomplete. It doesn't explain the return format, pagination behavior, or error conditions, which are critical for an agent to use this tool effectively in a real-world context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for 'page', 'count', and 'sort' parameters. The description adds no additional meaning beyond the schema, such as default values, valid sort options, or parameter interactions. Baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get a listing of attachments' states a clear verb ('Get') and resource ('attachments'), but it's vague about scope and doesn't differentiate from sibling tools like 'list_books', 'list_chapters', or 'get_attachment'. It lacks specificity about what kind of attachments or what context they belong to.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention when to choose 'list_attachments' over 'get_attachment' for a single attachment, or over 'search_all' for broader queries, nor does it specify any prerequisites or exclusions for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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