Skip to main content
Glama

fetch_attachment

Read-onlyIdempotent

Retrieve attachment content as base64-encoded data. Use this to read PDFs, process images, or analyze files from Outline documents.

Instructions

    Fetch attachment content and return it as base64.

    Calls attachments.redirect, follows the redirect, and returns the
    raw file content encoded as base64. Useful for images and files
    that agents can process.

    Use this tool when you need to:
    - Read PDF content from Outline documents
    - Process embedded images
    - Analyze files referenced in documents
    - Enable AI tools to work with all document content

    Args:
        attachment_id: The attachment UUID

    Returns:
        Multi-line string in this format (blank line after Content-Length
        / before Content-Base64):
        Content-Type: <mime-type>
        Content-Length: <bytes>

        Content-Base64: <base64-encoded-data>

        Note: For large files (e.g. multi-MB PDFs), the base64 output
        may hit token limits. Prefer get_attachment_url to obtain a
        download URL for large attachments, then fetch externally.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attachment_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description explains the internal mechanism ('calls attachments.redirect, follows the redirect') and returns base64-encoded content. It mentions token limits for large files. Annotations already indicate read-only and idempotent, but description adds valuable behavioral context without contradiction.

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 well-structured with a clear opening, bullet points for usage, and a note with important caveats. Every sentence adds value and there is no redundancy.

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

Completeness5/5

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

Given the output schema exists, the description still details the return format with exact fields (Content-Type, Content-Length, Content-Base64) and handles edge cases like large files. It is fully adequate for an agent to understand behavior and results.

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 only parameter 'attachment_id' receives a brief description ('The attachment UUID') which adds minimal meaning beyond the schema's type and title. With 0% schema description coverage, more detail on format or source would be helpful, but the parameter is simple and single, so 3 is appropriate.

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 begins with 'Fetch attachment content and return it as base64,' a clear verb+resource. It distinguishes itself from sibling 'get_attachment_url' by explicitly recommending that alternative for large files.

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 lists specific use cases (read PDF, process images, etc.) and provides a clear note advising when to use 'get_attachment_url' instead for large files, offering explicit when-to-use and when-not-to-use guidance.

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/Vortiago/mcp-outline'

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