get_attachment_content
Reads an attachment's actual content, not just metadata, returning viewable images or text inline and flagging oversized or unsupported files. Use it to inspect attachments without downloads.
Instructions
Read an attachment's actual content, not just its metadata.
Returns a JSON block describing the outcome, followed by the content itself as a native block when it can be inlined:
PNG/JPEG/GIF/WebP come back as an image the model can see
text-like content (text/*, JSON, XML) comes back as text, cut at the byte limit if it is long (outcome "text", truncated=true)
an image over the byte limit is refused whole rather than returned partially (outcome "too_large")
anything else returns metadata only (outcome "not_inline_supported"); no bytes, since no MCP client could display them; content_type there is the attachment's stored type, which names the file where the served header only says "not inlineable"
max_bytes may only LOWER the server's configured limit (OPENPROJECT_ATTACHMENT_CONTENT_MAX_BYTES, 5 MB by default), never raise it.
size_bytes is the size of the returned content block, and is null if file_size_bytes is hidden by server configuration, rather than leaking it indirectly under another name.
Nothing is written to disk. Use get_attachment for metadata alone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_bytes | No | ||
| attachment_id | Yes |