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
  • inboxIdstringrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • isRead"true" | "false"optional

    Only read or only unread threads.

  • qstringoptional

    Keep the threads whose subject or a participant address contains this text, case-insensitively.

  • labelstringoptional

    Only threads containing this exact, case-sensitive label. Example: needs-review

  • limitintegeroptional

    Page size, 1 to 100. Defaults to 50.

  • offsetintegeroptional

    Rows to skip. Defaults to 0.

Inputs that are not fields of the request body
InputSent as
inboxIdthe path parameter inboxId
isReadthe query parameter isRead
qthe query parameter q
labelthe query parameter label
limitthe query parameter limit
offsetthe query parameter offset

Example call

{
  "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
  • threadIdstringrequired

    The thread. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

Inputs that are not fields of the request body
InputSent as
threadIdthe path parameter threadId

Example call

{
  "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:write and mail: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
  • threadIdstringrequired

    The thread. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

  • isReadbooleanoptional

  • metadataobject of string | number | boolean | nulloptional

    Extension 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[]optional

    At most 20 unique labels. Replaced as a whole; [] clears the labels. Example: ["needs-review"]

Inputs that are not fields of the request body
InputSent as
threadIdthe path parameter threadId

Example call

{
  "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:write and mail: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
  • threadIdstringrequired

    The thread. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

Inputs that are not fields of the request body
InputSent as
threadIdthe path parameter threadId

Example call

{
  "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
  • threadIdstringrequired

    The thread. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

Inputs that are not fields of the request body
InputSent as
threadIdthe path parameter threadId

Example call

{
  "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
  • inboxIdstringrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • direction"inbound" | "outbound"optional

    Only received or only sent messages.

  • limitintegeroptional

    Page size, 1 to 100. Defaults to 50.

  • offsetintegeroptional

    Rows to skip. Defaults to 0.

Inputs that are not fields of the request body
InputSent as
inboxIdthe path parameter inboxId
directionthe query parameter direction
limitthe query parameter limit
offsetthe query parameter offset

Example call

{
  "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
  • messageIdstringrequired

    The message. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s

Inputs that are not fields of the request body
InputSent as
messageIdthe path parameter messageId

Example call

{
  "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
  • messageIdstringrequired

    The message. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s

  • filenamestringrequired

    The attachment's file name, as the message lists it. Example: invoice.pdf

Inputs that are not fields of the request body
InputSent as
messageIdthe path parameter messageId
filenamethe path parameter filename

Example call

{
  "name": "attachments_text",
  "arguments": {
    "messageId": "msg_01jc5a6g7h8j9k0m1n2p3q4r5s",
    "filename": "invoice.pdf"
  }
}

Up Down to move, Enter to open, Esc to close