Skip to main content
Glama
megamaced

collectives-mcp

by megamaced

upload_attachment

DestructiveIdempotent

Upload a file attachment to a page and get a percent-encoded relative path for pasting into markdown.

Instructions

Upload an attachment to a page. Creates the attachment directory if needed. Returns a percent-encoded relativePath ready to paste into markdown (e.g. ![alt](.attachments.{pageId}/filename.png)).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYes
contentYesFile content, interpreted according to `encoding`.
encodingNoHow `content` is encoded. Set this explicitly for binary files. If omitted it is inferred from contentType: textual types (text/*, application/json, image/svg+xml, */*+json, */*+xml) are read as utf8, everything else as base64. A missing contentType is treated as utf8.
filenameYesFilename for the attachment.
contentTypeNoMIME type (e.g. "image/png", "text/plain"). Defaults to application/octet-stream.
collectiveIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.1
    • changedInput schema / properties / content / description
      Previous value: -"File content as a UTF-8 string (for text) or base64-encoded string (for binary; set contentType accordingly)."New value: +"File content, interpreted according to `encoding`."
    • addedInput schema / properties / encoding
      Added value: +{
      +  "description": "How `content` is encoded. Set this explicitly for binary files. If omitted it is inferred from contentType: textual types (text/*, application/json, image/svg+xml, */*+json, */*+xml) are read as utf8, everything else as base64. A missing contentType is treated as utf8.",
      +  "enum": [
      +    "utf8",
      +    "base64"
      +  ],
      +  "type": "string"
      +}
  2. First observedv0.2.2

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=true, so the safety profile is covered. The description adds useful context about directory creation and the return format (a ready-to-paste markdown path), which goes beyond the annotations. It does not mention potential overwrite or other destructive side effects that might align with destructiveHint, but given the annotations, the description need not repeat that. It adds value without contradicting.

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 with zero redundancy. The main action is stated first, then the directory side-effect, then the return format with a concrete example. Every sentence carries information essential to using the tool correctly, and the structure is front-loaded.

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 6-parameter mutation tool with no output schema, the description is quite complete: it explains the core action, a side effect (directory creation), the encoding default behavior, and the exact return value format, which is crucial for the agent to know how to use the result. It lacks explicit error handling or size limits, but those are not typically required. The description, combined with the schema and annotations, covers what an agent needs to invoke it correctly.

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 already describes content, encoding, filename, and contentType with useful defaults and inference rules. The description adds nothing new about these parameters beyond what the schema states, but it also does not compensate for the undocumented pageId and collectiveId parameters (which lack schema descriptions). With 67% schema coverage, the description falls short of explaining the required IDs, though the markdown example hints at pageId's role. It provides marginal added value but does not fill all gaps.

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?

The description opens with a specific verb and resource: 'Upload an attachment to a page.' It also explains the side-effect of directory creation and the return format (percent-encoded relativePath), which clearly distinguishes it from sibling operations like list_attachments, delete_attachment, or get_attachment. An agent can immediately recognize this is the upload action among a set of attachment-related tools.

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?

The description makes the tool's role self-evident among siblings; it is the only upload operation, while others handle listing, deletion, retrieval, renaming, and restoration. However, it does not explicitly state when to use it versus alternatives (e.g., 'use this to add a new attachment, not to modify existing ones'). The distinction is implicit but strong enough for an agent to infer the correct selection.

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