MCP Tools Reference: gmailmcp.googleapis.com

Tool: list_drafts

Lists draft emails from the authenticated user's Gmail account.

This tool can filter drafts based on a query string and supports pagination. It returns a list of drafts, including their IDs and subjects.

The following sample demonstrate how to use curl to invoke the list_drafts MCP tool.

Curl Request
curl  
--location  
 'https://gmailmcp.googleapis.com/mcp' 
  
 \ 
--header  
 'content-type: application/json' 
  
 \ 
--header  
 'accept: application/json, text/event-stream' 
  
 \ 
--data  
 '{ 
 "method": "tools/call", 
 "params": { 
 "name": "list_drafts", 
 "arguments": { 
 // provide these details according to the tool MCP specification 
 } 
 }, 
 "jsonrpc": "2.0", 
 "id": 1 
 }' 
  

Input Schema

Request message for ListDrafts RPC.

ListDraftsRequest

JSON representation
 { 
 "pageSize" 
 : 
 integer 
 "pageToken" 
 : 
 string 
 "query" 
 : 
 string 
 } 
Fields

Union field _page_size .

_page_size can be only one of the following:

pageSize

integer

Optional. The maximum number of drafts to return. If unspecified, defaults to 20. The maximum allowed value is 50.

Union field _page_token .

_page_token can be only one of the following:

pageToken

string

Optional. A token received from a previous list_drafts call to retrieve the next page of results. Leave empty to fetch the first page.

Union field _query .

_query can be only one of the following:

query

string

Optional. A query string to filter the drafts, using the same format as the Gmail search bar. If omitted, all drafts (excluding spam and trash by default) are listed. Key Operators: from: - Messages from a specific sender. to: - Messages sent to a specific recipient. subject: - Messages with specific words in the subject. - Messages containing specific words in the body or subject. is:unread - Unread messages. is:starred - Starred messages. has:attachment - Messages with attachments. after:YYYY/MM/DD - Messages sent after a date. before:YYYY/MM/DD - Messages sent before a date. newer_than:

 Examples:
 "subject:OneMCP Update"
 "from:gduser1@workspacesamples.dev"
 "to:gduser2@workspacesamples.dev AND newer_than:7d"
 "project proposal has:attachment"
 "is:unread" 

Output Schema

Response message for ListDrafts RPC.

ListDraftsResponse

JSON representation
 { 
 "drafts" 
 : 
 [ 
 { 
 object (  Draft 
 
) 
 } 
 ] 
 , 
 "nextPageToken" 
 : 
 string 
 } 
Fields
drafts[]

object ( Draft )

List of drafts.

nextPageToken

string

A token that can be used in a subsequent call to retrieve the next page of drafts. Present only if there are more results.

Draft

JSON representation
 { 
 "id" 
 : 
 string 
 , 
 "subject" 
 : 
 string 
 , 
 "threadId" 
 : 
 string 
 , 
 "toRecipients" 
 : 
 [ 
 string 
 ] 
 , 
 "ccRecipients" 
 : 
 [ 
 string 
 ] 
 , 
 "bccRecipients" 
 : 
 [ 
 string 
 ] 
 , 
 "plaintextBody" 
 : 
 string 
 , 
 "date" 
 : 
 string 
 } 
Fields
id

string

The unique identifier of the draft resource.

subject

string

The subject line of the draft message.

threadId

string

The ID of the thread this draft belongs to.

toRecipients[]

string

List of 'To' recipient email addresses extracted from headers.

ccRecipients[]

string

List of 'Cc' recipient email addresses extracted from headers.

bccRecipients[]

string

List of 'Bcc' recipient email addresses extracted from headers.

plaintextBody

string

Plain text body content, if available.

date

string

Date of the draft in ISO 8601 format (YYYY-MM-DD).

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ❌

Create a Mobile Website
View Site in Mobile | Classic
Share by: