Read attachment
read_attachmentReturn the content of a single attachment by its id — the value of a File or Image column, which is the id of the attachment record in the sfiles table (metadata via read_data). Images (png, jpg, gif, webp) are returned as an MCP image block; text files (csv, eml, htm, html, ini, json, log, md, sql, svg, txt, xml, yaml, yml) as JSON with encoding 'text', decoded by the encoding detected from the byte order mark of the stored file; a file without one is decoded as UTF-8 and, when it is not valid UTF-8, by the server code page; other files as an embedded MCP resource block (base64 blob). Attachments larger than 10 MB are refused.
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": {
"id": "<id>"
},
"name": "read_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Attachment id — the value of a File/Image column, or sfiles.id. |