Skip to main content
Glama
megamaced

collectives-mcp

by megamaced

get_attachment

Read-onlyIdempotent

Retrieve an attachment from a collective page by specifying collective ID, page ID, and filename. Returns content as UTF-8 text or base64, and rejects files larger than 5 MB.

Instructions

Download an attachment's contents. Returns the bytes as utf8 text or a base64 string, with the encoding stated in the result. Refuses files over 5 MB, which should be fetched from Nextcloud directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYes
encodingNoHow to return the content. If omitted it is inferred from the stored MIME type: textual types as utf8, everything else as base64.
filenameYesAttachment filename from list_attachments.
collectiveIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.2/5.0
Behavior4/5

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

Beyond readOnlyHint/idempotentHint annotations, the description discloses the return format (utf8 or base64 with encoding stated) and the 5 MB refusal. No contradictions with annotations.

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?

Two sentences, no filler. The purpose is front-loaded, and the size limitation is stated clearly. Every sentence adds value.

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

Completeness4/5

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

For a simple read tool with annotations covering safety, the description covers purpose, output format, and a size constraint. It doesn't mention error cases or parameter relationships, but these are not critical for a straightforward download operation.

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?

Schema already documents encoding and filename with descriptions. The description does not add parameter semantics for pageId and collectiveId, which remain undocumented. Coverage is 50%, and the description doesn't compensate for the missing two.

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

Purpose5/5

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

States a specific verb and resource: 'Download an attachment's contents.' Clearly distinguishes from sibling attachment tools (upload, delete, rename, restore) by naming the download action and specifying the output format.

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

Usage Guidelines4/5

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

Provides an explicit exclusion for files over 5 MB, directing users to fetch them directly from Nextcloud. This gives clear when-not guidance. Does not explicitly contrast with list_attachments, but that is a listing tool and not a competitor for this action.

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