Read an attachment
odoo_attachment_contentList attachments on an Odoo record or fetch the content of one attachment. In list mode (res_model + res_id) returns only metadata (no binary). In fetch mode (attachment_id) returns the content itself: text for text/, json/xml/csv/yaml, SVG and Office documents (docx/xlsx/xls, text-extracted). In the chat its text comes whole when it fits, and with the sandbox on the file is also there under the name in file: when the text does not fit, read it with execute_code. Without the sandbox a text that does not fit comes in pages: call again with the offset it gives. Pass limit for a slice of your own (in the chat it is capped by what is left of the turn's share). Elsewhere the text is paginated via offset/limit, in chars. The image for image/ (tiff/bmp/heic are converted to PNG); the document for application/pdf. A PDF is routed by what it is: mostly-scanned pages travel as the document itself, a text PDF comes back as Markdown you can page through. Text and Office have size caps (5 MB / 10 MB), and a PDF or image that travels as BYTES has one too; oversize ones return an error with metadata so the LLM can explain. Audio (up to 25 MB) comes back as its transcript, paged like any text: transcribing spends from the chat budget, once per file, and over MCP it needs a chat seat. Video and archives return metadata with an explicit reason — for a video on Google Drive, use video_ask instead.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "odoo_attachment_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max chars to return for text content (default 8000 outside the chat). In the chat, omit it to get the whole text when it fits. | |
| offset | No | Char offset for text content pagination. | |
| res_id | No | Record ID to list attachments for (use with res_model). | |
| res_model | No | Model name to list attachments for (use with res_id). | |
| attachment_id | No | ID of the ir.attachment record to fetch. |