Skip to main content
Glama

get_attachment

Retrieve a file attached to a document. Returns file name, size, and content in base64, plus text rendition when the bytes are valid UTF-8.

Instructions

Fetch the file attached to a plaintext document. Returns filename, byte size, base64-encoded content, and a UTF-8 text rendition when the bytes are valid UTF-8 (e.g. .md, .txt, .json). Refuses if the attachment is encrypted client-side (named '_dmencblob').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDocument id (UUID) whose attachment you want.
Behavior4/5

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

With no annotations, the description fully discloses return contents and a specific refusal case. It does not cover error handling or rate limits, but the provided details are sufficient for a read-only fetch operation.

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 two sentences, front-loaded with the main action and immediate result details. Every sentence adds value with no redundancy.

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 simple parameter and no output schema, the description covers key output fields and a refusal condition. Missing details about handling missing attachments or invalid IDs, but overall adequate.

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 schema already describes the 'id' parameter as a UUID. The description adds 'plaintext document' context, but does not significantly enhance the parameter semantics beyond the schema, which has 100% coverage.

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 it fetches the file attached to a plaintext document and enumerates return fields (filename, byte size, base64 content, UTF-8 text rendition). It distinguishes from sibling tools like add_attachment and delete_attachment by focusing on retrieval.

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 implies this tool is used when the user needs an attachment from a plaintext document. It provides a refusal condition for encrypted attachments, offering a hint for when not to use it, but does not explicitly compare with siblings.

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