read_attachment
Retrieve metadata and size-capped base64 content for an Odoo attachment. Use to access document details programmatically.
Instructions
Read an ir.attachment's metadata and size-capped base64 content
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": "read_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | ||
| include_data | No | ||
| attachment_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | Reporting tool name. | |
| error | No | Sanitized error message when success is false. | |
| success | Yes | False when the call failed; see error. | |
| warnings | No | ||
| max_bytes | No | ||
| attachment | No | ir.attachment metadata row. | |
| data_base64 | No | Base64 content when under the size cap. | |
| data_included | No |