Skip to main content
Glama

add_attachment

Attach a file to an existing plaintext document. Replaces any prior attachment. Works with UTF-8 text or base64 binary. Refuses if document is encrypted.

Instructions

Attach a file to an existing plaintext document. Replaces any pre-existing attachment for that document (one attachment per doc by design). Refuses if the document is encrypted client-side. Provide either 'content' (UTF-8 text, e.g. markdown) or 'content_base64' (binary, base64-encoded).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoUTF-8 text content (mutually exclusive with content_base64).
content_base64NoBase64-encoded binary content (mutually exclusive with content).
filenameYesFilename for the attachment, e.g. 'plan.md'. Must not contain path separators or equal the reserved name 'dmencblob'.
idYesTarget document id (UUID).
Behavior5/5

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

With no annotations, the description fully bears the transparency burden. It discloses key behaviors: replacement of existing attachments, refusal for encrypted documents, and the one-attachment-per-doc constraint. This gives the agent a clear picture of the tool's side effects and limitations.

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 concise (three sentences) and front-loaded with the primary action. Every sentence adds necessary context without redundancy. It wastes no words.

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?

Given the tool's moderate complexity and the absence of an output schema, the description covers the essential behaviors (attachment, replacement, encryption restriction). It could optionally mention what the response looks like or failure modes, but overall it is sufficiently complete for an agent to use correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents each parameter. The description adds value by explaining the mutual exclusivity of 'content' and 'content_base64' and the filename constraints, reinforcing the schema description. While helpful, it does not introduce entirely new information, so a slight premium over baseline 3 is warranted.

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 clearly states the tool's purpose: 'Attach a file to an existing plaintext document.' It distinguishes itself from siblings by specifying the one-attachment-per-doc design and replacement behavior, making it easy to understand when to use this tool.

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

Usage Guidelines5/5

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

The description provides explicit usage context: it replaces pre-existing attachments, refuses encrypted documents, and clarifies the mutual exclusivity of content inputs. This helps the agent decide when to use this tool versus others like delete_attachment or update_document.

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/giuliohome-org/doc-manager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server