Get attachment
get_attachmentReturns an attachment. Text-like files (txt, csv, json, xml) and PDFs with a text layer come back as text; anything else as a one-hour download link: give that link to the user instead of reading the file. Pass inline=true only when the content itself is needed here (max 2097152 bytes).
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": {
"account": "<account>",
"uid": "<uid>",
"part": "<part>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | uid from search_messages | |
| part | Yes | part id from get_message | |
| folder | No | Default: Gmail All Mail, else INBOX | |
| inline | No | Embed the bytes instead of a link | |
| account | Yes | list_accounts id |