tool_get_attachment
Retrieve a specific attachment by its database ROWID. Returns image inline when possible, otherwise provides a local file path.
Instructions
Fetch a specific attachment by its database ROWID.
This is read-only: it resolves a local Messages attachment file and does not
modify or delete it. Requires Full Disk Access for the host app or terminal.
For image MIME types under max_bytes, returns the image inline so you can see
it directly; accompanying filename, MIME, and path text is structurally
neutralized and wrapped in <untrusted-mcp-output>. For PDFs, video, audio,
missing files, or oversize images, returns a filesystem path or error in that
same untrusted block. Use tool_search_attachments first unless you already
have an attachment ID.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"attachment_id": "<attachment_id>"
},
"name": "tool_get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_bytes | No | Maximum inline image payload size in bytes. Larger files return a local filesystem path instead. | |
| attachment_id | Yes | Messages attachment ROWID from tool_search_attachments or an attachment marker in message search results. |