fetch_attachment
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
| Name | Required | Description | Default |
|---|---|---|---|
| attachment_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |