MCP tools: Mail
The tools of the MCP server under Mail. Threads, messages, raw and HTML bodies, attachments and their extracted text.
inboxes_threads_list
Tool for inboxes.threads.list: GET /v1/inboxes/{inboxId}/threads
The inbox's threads, newest activity first. Filter by read state, or search the subject and participants. Trashed threads are left out. OAuth: requires mail:read.
- Offered to
- A connected agent with an approval that covers
mail:read. The default agent permissions cover it. With a key: any API key, or a console session. - Annotations
readOnlyHint: true,destructiveHint: false,idempotentHint: true,openWorldHint: false. The tool reads only; calling it again with the same input has no further effect.
Input
inboxIdstringrequiredThe inbox. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7zisRead"true" | "false"optionalOnly read or only unread threads.
qstringoptionalKeep the threads whose subject or a participant address contains this text, case-insensitively.
labelstringoptionalOnly threads containing this exact, case-sensitive label. Example:
needs-reviewlimitintegeroptionalPage size, 1 to 100. Defaults to 50.
offsetintegeroptionalRows to skip. Defaults to 0.
Inputs that are not fields of the request body
| Input | Sent as |
|---|---|
inboxId | the path parameter inboxId |
isRead | the query parameter isRead |
q | the query parameter q |
label | the query parameter label |
limit | the query parameter limit |
offset | the query parameter offset |
{
"name": "inboxes_threads_list",
"arguments": {
"inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z"
}
}threads_get
Tool for threads.get: GET /v1/threads/{threadId}
One thread's summary. Its messages are at /v1/threads/{threadId}/messages. OAuth: requires mail:read.
- Offered to
- A connected agent with an approval that covers
mail:read. The default agent permissions cover it. With a key: any API key, or a console session. - Annotations
readOnlyHint: true,destructiveHint: false,idempotentHint: true,openWorldHint: false. The tool reads only; calling it again with the same input has no further effect.
Input
threadIdstringrequiredThe thread. Example:
thr_01jc5a1b2c3d4e5f6g7h8j9k0m
Inputs that are not fields of the request body
| Input | Sent as |
|---|---|
threadId | the path parameter threadId |
{
"name": "threads_get",
"arguments": {
"threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m"
}
}threads_update
Tool for threads.update: PATCH /v1/threads/{threadId}
Sets read state, metadata or labels. Omitted fields stay unchanged; metadata and labels replace the whole value, with {} or [] clearing it. Sending a reply marks the thread read as well. Actual changes emit thread.updated. OAuth: requires mail:write, mail:read.
- Offered to
- A connected agent with an approval that covers
mail:writeandmail:read. The default agent permissions cover it. With a key: any API key, or a console session. - Annotations
readOnlyHint: false,destructiveHint: false,idempotentHint: true,openWorldHint: false. The tool changes something; calling it again with the same input has no further effect.
Input
threadIdstringrequiredThe thread. Example:
thr_01jc5a1b2c3d4e5f6g7h8j9k0misReadbooleanoptionalmetadataobject of string | number | boolean | nulloptionalExtension state: at most 20 keys and 2048 bytes of UTF-8 JSON. Keys are 1 to 64 ASCII letters, digits, underscores, dots, colons or hyphens, starting with a letter or digit. Values are strings, finite numbers, booleans or null. Replaced as a whole; {} clears it. Do not store secrets. Example:
{"customer":"customer-8841","reviewed":false}labelsstring[]optionalAt most 20 unique labels. Replaced as a whole; [] clears the labels. Example:
["needs-review"]
Inputs that are not fields of the request body
| Input | Sent as |
|---|---|
threadId | the path parameter threadId |
{
"name": "threads_update",
"arguments": {
"threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m",
"isRead": true
}
}threads_trash
Tool for threads.trash: DELETE /v1/threads/{threadId}
The thread and its messages leave every list and read, a reply to it answers 404 thread_not_found, and a later message in the same conversation starts a new thread. Where the deployment erases, it is erased 30 days later. OAuth: requires mail:write, mail:read.
- Offered to
- A connected agent with an approval that covers
mail:writeandmail:read. The default agent permissions cover it. With a key: any API key, or a console session. - Annotations
readOnlyHint: false,destructiveHint: true,idempotentHint: true,openWorldHint: false. The tool changes something; can remove something, or replace a secret that stops verifying at once; calling it again with the same input has no further effect.
Input
threadIdstringrequiredThe thread. Example:
thr_01jc5a1b2c3d4e5f6g7h8j9k0m
Inputs that are not fields of the request body
| Input | Sent as |
|---|---|
threadId | the path parameter threadId |
{
"name": "threads_trash",
"arguments": {
"threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m"
}
}threads_messages
Tool for threads.messages: GET /v1/threads/{threadId}/messages
The thread and its messages in order, oldest first, each with its text, classification and attachments. OAuth: requires mail:read.
- Offered to
- A connected agent with an approval that covers
mail:read. The default agent permissions cover it. With a key: any API key, or a console session. - Annotations
readOnlyHint: true,destructiveHint: false,idempotentHint: true,openWorldHint: false. The tool reads only; calling it again with the same input has no further effect.
Input
threadIdstringrequiredThe thread. Example:
thr_01jc5a1b2c3d4e5f6g7h8j9k0m
Inputs that are not fields of the request body
| Input | Sent as |
|---|---|
threadId | the path parameter threadId |
{
"name": "threads_messages",
"arguments": {
"threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m"
}
}inboxes_messages_list
Tool for inboxes.messages.list: GET /v1/inboxes/{inboxId}/messages
The inbox's messages across threads, newest first, inbound and outbound alike unless filtered. Messages in trashed threads are left out. OAuth: requires mail:read.
- Offered to
- A connected agent with an approval that covers
mail:read. The default agent permissions cover it. With a key: any API key, or a console session. - Annotations
readOnlyHint: true,destructiveHint: false,idempotentHint: true,openWorldHint: false. The tool reads only; calling it again with the same input has no further effect.
Input
inboxIdstringrequiredThe inbox. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7zdirection"inbound" | "outbound"optionalOnly received or only sent messages.
limitintegeroptionalPage size, 1 to 100. Defaults to 50.
offsetintegeroptionalRows to skip. Defaults to 0.
Inputs that are not fields of the request body
| Input | Sent as |
|---|---|
inboxId | the path parameter inboxId |
direction | the query parameter direction |
limit | the query parameter limit |
offset | the query parameter offset |
{
"name": "inboxes_messages_list",
"arguments": {
"inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z"
}
}messages_get
Tool for messages.get: GET /v1/messages/{messageId}
One message with its text, headers, classification and attachments. OAuth: requires mail:read.
- Offered to
- A connected agent with an approval that covers
mail:read. The default agent permissions cover it. With a key: any API key, or a console session. - Annotations
readOnlyHint: true,destructiveHint: false,idempotentHint: true,openWorldHint: false. The tool reads only; calling it again with the same input has no further effect.
Input
messageIdstringrequiredThe message. Example:
msg_01jc5a6g7h8j9k0m1n2p3q4r5s
Inputs that are not fields of the request body
| Input | Sent as |
|---|---|
messageId | the path parameter messageId |
{
"name": "messages_get",
"arguments": {
"messageId": "msg_01jc5a6g7h8j9k0m1n2p3q4r5s"
}
}attachments_text
Tool for attachments.text: GET /v1/attachments/{messageId}/{filename}/text
The extracted text and how it was obtained, or why it was not. OAuth: requires mail:read.
- Offered to
- A connected agent with an approval that covers
mail:read. The default agent permissions cover it. With a key: any API key, or a console session. - Annotations
readOnlyHint: true,destructiveHint: false,idempotentHint: true,openWorldHint: false. The tool reads only; calling it again with the same input has no further effect.
Input
messageIdstringrequiredThe message. Example:
msg_01jc5a6g7h8j9k0m1n2p3q4r5sfilenamestringrequiredThe attachment's file name, as the message lists it. Example:
invoice.pdf
Inputs that are not fields of the request body
| Input | Sent as |
|---|---|
messageId | the path parameter messageId |
filename | the path parameter filename |
{
"name": "attachments_text",
"arguments": {
"messageId": "msg_01jc5a6g7h8j9k0m1n2p3q4r5s",
"filename": "invoice.pdf"
}
}
