---
title: "Imports"
description: "Old mail coming in, and moves from another provider."
url: "https://openemail.uk/docs/mcp/tools/imports"
area: "MCP server"
category: "Tools"
---

# Imports

Old mail coming in, and moves from another provider.

## Imports tools

| Tool | What it does |
| --- | --- |
| listImports | The imports of old mail into the workspace, newest first, with their status and progress. `addressId` keeps the ones into one address. |
| getImport | One import by its id: its files, how far it has read and how many messages it imported. |
| listImportFailures | The messages an import could not bring in, and why. |
| cancelImport | Stop an import that is still running. Mail it already imported stays. In the app’s chat it always asks first. |
| listProviderImports | The imports from another email provider, such as Resend, newest first, with their status. |
| getProviderImport | One import from another provider with its report: what came across, the domains to publish here and the API keys to replace. |
| cancelProviderImport | Stop an import from another provider that is still running. What it already brought across stays. In the app’s chat it always asks first. |

> Imports of old mail need `threads:read`, and `threads:write` to cancel one. A client limited to some addresses sees only the imports into them.

> Imports from another provider need `settings:read`, and `settings:write` to cancel one. Only the workspace owner reaches them.

> No tool uploads mail or starts an import, because the files go up in parts and an import from another provider needs its API key. Start one on the Migrations page of the app, or with `POST /imports` and `POST /provider-imports` on the REST API.

## Reference

### `listImports`

The imports of old mail into this workspace, newest first, as the Migrations page of the app lists them: the address each one fills, its status, how far it has read and how many messages it imported. addressId keeps the ones into one address. A member sees the imports into the addresses they reach. One page at a time: when more follow, the last line gives a cursor to pass back for the next page.

- Scopes: `threads:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `addressId` (`string`, 1 to 128 characters)
- `limit` (`integer`, at least 1, at most 100)
- `cursor` (`string`)

Also available in: API [`GET /imports`](https://openemail.uk/docs/api/reference/imports#get-imports); SDK [`imports.list()`](https://openemail.uk/docs/sdk/reference/imports#list), [`imports.listAll()`](https://openemail.uk/docs/sdk/reference/imports#listAll), [`imports.iterate()`](https://openemail.uk/docs/sdk/reference/imports#iterate).

### `getImport`

One import of old mail by its id: its status, the files it reads, how far it has read, and how many messages it imported, found already here, left out or could not import. listImportFailures says which messages did not import and why.

- Scopes: `threads:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `id` (`string`, required, 1 to 128 characters)

Also available in: API [`GET /imports/{id}`](https://openemail.uk/docs/api/reference/imports#get-imports-id); SDK [`imports.get()`](https://openemail.uk/docs/sdk/reference/imports#get).

### `listImportFailures`

The messages an import could not bring in, in the order it met them, with the reason for each, as What was not imported on the Migrations page shows them. When more follow, the last line gives the after value to pass back for the next page.

- Scopes: `threads:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `id` (`string`, required, 1 to 128 characters)
- `after` (`integer`, at least -1)
- `limit` (`integer`, at least 1, at most 100)

Also available in: API [`GET /imports/{id}/failures`](https://openemail.uk/docs/api/reference/imports#get-imports-id-failures); SDK [`imports.listFailures()`](https://openemail.uk/docs/sdk/reference/imports#listFailures).

### `cancelImport`

Stop an import of old mail that is still uploading, waiting or running, as Cancel import on the Migrations page does. Mail it already imported stays in the mailbox. A chat always asks first.

- Scopes: `threads:write`.
- The app's assistant always asks first.
- Toolkit: `workspace`.

**Inputs**

- `id` (`string`, required, 1 to 128 characters)

Also available in: API [`POST /imports/{id}/cancel`](https://openemail.uk/docs/api/reference/imports#post-imports-id-cancel); SDK [`imports.cancel()`](https://openemail.uk/docs/sdk/reference/imports#cancel).

### `listProviderImports`

The imports from another email provider, such as Resend, into this workspace, newest first: what each one brings across and its status. Only the workspace owner reaches them. getProviderImport gives the full report of one. One page at a time: when more follow, the last line gives a cursor to pass back for the next page.

- Scopes: `settings:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `limit` (`integer`, at least 1, at most 100)
- `cursor` (`string`)

Also available in: API [`GET /provider-imports`](https://openemail.uk/docs/api/reference/imports#get-provider-imports), [`GET /provider-imports/{id}`](https://openemail.uk/docs/api/reference/imports#get-provider-imports-id); SDK [`providerImports.list()`](https://openemail.uk/docs/sdk/reference/provider-imports#list), [`providerImports.listAll()`](https://openemail.uk/docs/sdk/reference/provider-imports#listAll), [`providerImports.iterate()`](https://openemail.uk/docs/sdk/reference/provider-imports#iterate), [`providerImports.get()`](https://openemail.uk/docs/sdk/reference/provider-imports#get).

### `getProviderImport`

One import from another email provider by its id, with its report as the Migrations page shows it: what came across, the domains to publish here, the API keys to replace and what was not brought across. Only the workspace owner reaches it.

- Scopes: `settings:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `id` (`string`, required, 1 to 128 characters)

Also available in: API [`GET /provider-imports`](https://openemail.uk/docs/api/reference/imports#get-provider-imports), [`GET /provider-imports/{id}`](https://openemail.uk/docs/api/reference/imports#get-provider-imports-id); SDK [`providerImports.list()`](https://openemail.uk/docs/sdk/reference/provider-imports#list), [`providerImports.listAll()`](https://openemail.uk/docs/sdk/reference/provider-imports#listAll), [`providerImports.iterate()`](https://openemail.uk/docs/sdk/reference/provider-imports#iterate), [`providerImports.get()`](https://openemail.uk/docs/sdk/reference/provider-imports#get).

### `cancelProviderImport`

Stop an import from another email provider that is still waiting or running. What it already brought across stays. Only the workspace owner can, and a chat always asks first.

- Scopes: `settings:write`.
- The app's assistant always asks first.
- Toolkit: `workspace`.

**Inputs**

- `id` (`string`, required, 1 to 128 characters)

Also available in: API [`POST /provider-imports/{id}/cancel`](https://openemail.uk/docs/api/reference/imports#post-provider-imports-id-cancel); SDK [`providerImports.cancel()`](https://openemail.uk/docs/sdk/reference/provider-imports#cancel).
