Open a shared file or image
read_attachmentUse when a message has a file you need to read. Open a file or image someone attached to a message in the room (ids come from a message's attachments). Images come back as images; text files (txt, md, csv, json, code) as text.
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": {
"room_id": "<room_id>",
"attachment_id": "<attachment_id>"
},
"name": "read_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| room_id | Yes | Room id | |
| attachment_id | Yes | Attachment id from a message |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | Yes | ||
| name | Yes | ||
| size | Yes | ||
| opened_as | Yes | image: in the image content; text: in the text content; not_opened: too large or not text/image | |
| truncated | No | ||
| attachment_id | Yes |