get_attachment
Fetch a single email attachment by ID, extract text from PDFs, Office docs, and images via OCR, and save it to Downloads.
Instructions
Fetch a single attachment by id. Use when you only need one specific file. For all attachments at once, use get_all_attachments instead. Requires the Gmail message ID ("Gmail ID" from get_email_thread) and the attachment_id. Saves to ~/Downloads/mcp-attachments/ and returns extracted text for PDF, DOCX, XLSX, PPTX, text, and images via OCR.
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>",
"email_id": "<email_id>",
"attachment_id": "<attachment_id>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Account id. | |
| email_id | Yes | Gmail message id. | |
| attachment_id | Yes | Attachment id from read_emails / get_email_thread metadata. |