list_drafts
Retrieve drafts from the authenticated Gmail mailbox with query filters and pagination, optionally including SPAM and TRASH.
Instructions
List drafts in the authenticated user's mailbox.
Args: query: Gmail search syntax filter, e.g. 'to:alice@example.com subject:invoice'. max_results: Maximum number of drafts to return (default 50, max 500). page_token: Continuation token from a previous response for pagination. include_spam_trash: When True, include drafts from SPAM and TRASH.
Returns: Dictionary with drafts, optional next_page_token, and result_size_estimate. Each draft is {"id": draft ID (for get_draft, update_draft, delete_draft and send_draft), "message": ...}, where message is get_message's include_body=False shape: id, thread_id, snippet, label_ids, internal_date, size_estimate, and headers (to, cc, bcc, subject, date, ...). A draft that can't be read (e.g. sent or updated since it was listed) has message {id, thread_id} and an error. On API failure, returns {"error": "..."}.
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": "list_drafts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| page_token | No | ||
| max_results | No | ||
| include_spam_trash | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||