---
title: "MCP tools: Mail"
description: "The tools of the MCP server under Mail. Threads, messages, raw and HTML bodies, attachments and their extracted text."
url: https://doorman.fyi/docs/mcp/tools/mail
markdown: https://doorman.fyi/docs/mcp/tools/mail.md
area: "SDKs and tools"
section: "MCP server"
---

# MCP tools: Mail

The tools of the MCP server under Mail. Threads, messages, raw and HTML bodies, attachments and their extracted text.

Source: https://doorman.fyi/docs/mcp/tools/mail

## inboxes_threads_list

Tool:
```text
inboxes_threads_list
```

Operation [`inboxes.threads.list`](https://doorman.fyi/docs/reference/mail.md#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**
- `inboxId` (string): The inbox. Example: `inb_01jc4q7w9k2m5n8p3r6t1v4x7z`
- `isRead` ("true" | "false", optional): Only read or only unread threads.
- `q` (string, optional): Keep the threads whose subject or a participant address contains this text, case-insensitively.
- `label` (string, optional): Only threads containing this exact, case-sensitive label. Example: `needs-review`
- `limit` (integer, optional): Page size, 1 to 100. Defaults to 50.
- `offset` (integer, optional): Rows 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` |

Example call:
```json
{
  "name": "inboxes_threads_list",
  "arguments": {
    "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z"
  }
}
```

## threads_get

Tool:
```text
threads_get
```

Operation [`threads.get`](https://doorman.fyi/docs/reference/mail.md#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**
- `threadId` (string): The thread. Example: `thr_01jc5a1b2c3d4e5f6g7h8j9k0m`

**Inputs that are not fields of the request body**

| Input | Sent as |
| --- | --- |
| `threadId` | the path parameter `threadId` |

Example call:
```json
{
  "name": "threads_get",
  "arguments": {
    "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m"
  }
}
```

## threads_update

Tool:
```text
threads_update
```

Operation [`threads.update`](https://doorman.fyi/docs/reference/mail.md#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**
- `threadId` (string): The thread. Example: `thr_01jc5a1b2c3d4e5f6g7h8j9k0m`
- `isRead` (boolean, optional)
- `metadata` (object of string | number | boolean | null, optional): 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}`
- `labels` (string[], 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**

| Input | Sent as |
| --- | --- |
| `threadId` | the path parameter `threadId` |

Example call:
```json
{
  "name": "threads_update",
  "arguments": {
    "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m",
    "isRead": true
  }
}
```

## threads_trash

Tool:
```text
threads_trash
```

Operation [`threads.trash`](https://doorman.fyi/docs/reference/mail.md#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**
- `threadId` (string): The thread. Example: `thr_01jc5a1b2c3d4e5f6g7h8j9k0m`

**Inputs that are not fields of the request body**

| Input | Sent as |
| --- | --- |
| `threadId` | the path parameter `threadId` |

Example call:
```json
{
  "name": "threads_trash",
  "arguments": {
    "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m"
  }
}
```

## threads_messages

Tool:
```text
threads_messages
```

Operation [`threads.messages`](https://doorman.fyi/docs/reference/mail.md#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**
- `threadId` (string): The thread. Example: `thr_01jc5a1b2c3d4e5f6g7h8j9k0m`

**Inputs that are not fields of the request body**

| Input | Sent as |
| --- | --- |
| `threadId` | the path parameter `threadId` |

Example call:
```json
{
  "name": "threads_messages",
  "arguments": {
    "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m"
  }
}
```

## inboxes_messages_list

Tool:
```text
inboxes_messages_list
```

Operation [`inboxes.messages.list`](https://doorman.fyi/docs/reference/mail.md#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**
- `inboxId` (string): The inbox. Example: `inb_01jc4q7w9k2m5n8p3r6t1v4x7z`
- `direction` ("inbound" | "outbound", optional): Only received or only sent messages.
- `limit` (integer, optional): Page size, 1 to 100. Defaults to 50.
- `offset` (integer, optional): Rows 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` |

Example call:
```json
{
  "name": "inboxes_messages_list",
  "arguments": {
    "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z"
  }
}
```

## messages_get

Tool:
```text
messages_get
```

Operation [`messages.get`](https://doorman.fyi/docs/reference/mail.md#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**
- `messageId` (string): The message. Example: `msg_01jc5a6g7h8j9k0m1n2p3q4r5s`

**Inputs that are not fields of the request body**

| Input | Sent as |
| --- | --- |
| `messageId` | the path parameter `messageId` |

Example call:
```json
{
  "name": "messages_get",
  "arguments": {
    "messageId": "msg_01jc5a6g7h8j9k0m1n2p3q4r5s"
  }
}
```

## attachments_text

Tool:
```text
attachments_text
```

Operation [`attachments.text`](https://doorman.fyi/docs/reference/mail.md#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**
- `messageId` (string): The message. Example: `msg_01jc5a6g7h8j9k0m1n2p3q4r5s`
- `filename` (string): The 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` |

Example call:
```json
{
  "name": "attachments_text",
  "arguments": {
    "messageId": "msg_01jc5a6g7h8j9k0m1n2p3q4r5s",
    "filename": "invoice.pdf"
  }
}
```
