fetch_attachments
Download the files attached to one already-fetched mail and file them as documents. Required: email_id. Optional: entity + entity_id to say what they belong to (a mail already matched to an asbestos job attaches to that job by itself), include_inline (default false — signature images and template logos stay out), max_bytes. Running it twice does not store anything twice. Returns what was stored, what was skipped and why. The mailbox is only read: nothing is marked as seen and nothing is deleted.
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": {
"email_id": "<email_id>"
},
"name": "fetch_attachments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | No | Record type the attachments belong to (use with entity_id) | |
| email_id | Yes | ID of the email | |
| entity_id | No | ID of the record | |
| max_bytes | No | Maximum size in bytes for attachments to store | |
| include_inline | No | Also include inline |