Find emails with attachments
gmail_find_attachmentsSearch a read-only Gmail mailbox for messages with attachments and list each file's name, type, and size, so emailed photos or documents can be committed to GitHub.
Instructions
Search the authorized Gmail mailbox (read-only) and list matching messages with their attachments (name, type, size), so a photo or document someone emailed can be committed to GitHub with github_commit_attachment. Gmail search syntax: from:, subject:, newer_than:7d, filename:jpg. By default only messages with an attachment are returned; set requireAttachment=false to find a message whose text is in the body itself and read it with gmail_get_message. Only a ~200-character snippet is shown here.
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": "gmail_find_attachments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | Most messages to return. | |
| query | No | Gmail search query, e.g. 'from:alba newer_than:14d'. | newer_than:30d |
| requireAttachment | No | Keep the implicit 'has:attachment' filter. false searches every message, including ones whose content is in the email body (read it with gmail_get_message). |