Gmail Search
gmail_searchSearch emails using Gmail query syntax (e.g., 'from:sender@example.com', 'subject:invoice', 'has:attachment', 'after:2024/01/01', 'is:unread'). Returns matching message IDs.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "from:bob@example.com after:2024/01/01 has:attachment"
},
"name": "gmail_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Gmail search query (e.g., "from:bob@example.com after:2024/01/01 has:attachment") | |
| max_results | No | Maximum number of messages to return (default 10, max 100) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error code if connection not authenticated | |
| message | No | Error message if connection not authenticated | |
| messages | No | Array of matching message summaries | |
| nextPageToken | No | Token for fetching next page of results | |
| resultSizeEstimate | No | Estimated total number of matching messages |