# Errors

> Every error the Deeper Research MCP server returns, what it means, and what to do about it.

Source: https://deeperesearch.com/docs/mcp/errors/

Errors come in two forms.

**Tool errors** come back as a normal tool result with `isError: true`, so the agent can read them and act. The text reads `Error (code): message`, followed by a suggested next step, and `structuredContent.error` holds the `code` and `message`.

**Connection errors** are HTTP responses from `/mcp` before any tool runs, such as a missing token or a rate limit.

## Tool errors

### Spending

| Code                  | Meaning                                                                                                                                                                                        | What to do                                                                                                                                                                                                    |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `needs_confirmation`  | The worst-case cost is above this connection’s “ask first” amount                                                                                                                              | Ask the person. If they agree, call again with the same arguments and `confirmed: true`                                                                                                                       |
| `declined`            | The person declined in the confirmation form                                                                                                                                                   | Nothing was started or charged. Don’t retry unless they ask                                                                                                                                                   |
| `exceeds_max_cost`    | The worst case is above `max_cost_usd`                                                                                                                                                         | Choose cheaper providers, or ask whether to raise `max_cost_usd`                                                                                                                                              |
| `limit_reached`       | This would go over the connection’s per-research or monthly limit or the account’s daily budget, or too much research (or merging) is already running, or the account’s upload storage is full | The message says which. Ask the person; they can change an agent’s limits in [Settings → Connections](https://deeperesearch.com/app/settings/connections). For the running limit, wait for research to finish |
| `insufficient_credit` | Not enough credit for the worst-case hold                                                                                                                                                      | Add credit in [Settings → Billing](https://deeperesearch.com/app/settings/billing), or choose cheaper providers                                                                                               |

### Requests

| Code                 | Meaning                                                   | What to do                                      |
| -------------------- | --------------------------------------------------------- | ----------------------------------------------- |
| `invalid_request`    | A parameter is missing or invalid; the message says which | Fix the call                                    |
| `not_found`          | No research or report with that id in this account        | Check the id, or find it with `search_research` |
| `forbidden`          | The API key lacks the scope this tool needs               | Use a key with `research:write`                 |
| `vendor_unavailable` | A provider or tier isn’t available to this account        | Call `list_providers`                           |

### Attachments

| Code                   | Meaning                                                 | What to do                                                 |
| ---------------------- | ------------------------------------------------------- | ---------------------------------------------------------- |
| `attachment_not_found` | A file id in `attachments` doesn’t exist                | Call `attach_file` first and pass the `file_id` it returns |
| `contains_secret`      | The file appears to contain a key, token or private key | Remove the secret, or leave the file out                   |
| `file_too_large`       | Over 2 MB                                               | Attach the relevant part, or upload it in the web app      |
| `unreadable_file`      | The file couldn’t be read as its type                   | Check the `mime_type` and encoding                         |

### Merging

| Code                             | Meaning                                                            | What to do                                        |
| -------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------- |
| `no_mergeable_reports`           | No finished report can be merged yet                               | Wait for a mergeable provider to finish           |
| `insufficient_mergeable_vendors` | `merge` on `start_research` needs at least two mergeable providers | Add providers, or leave out `merge`               |
| `invalid_merge_config`           | Unknown model, or a thinking level the model doesn’t support       | Call `list_providers` for valid models and levels |
| `merge_unavailable`              | Synthesis merging isn’t enabled on this server                     | Leave out `merge`                                 |

## Connection errors

| Status | Code                  | Meaning                                                                                                                                                                         |
| ------ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `401`  | `unauthorized`        | No token, an invalid or revoked API key, an expired sign-in, or an agent disconnected in Settings. The `WWW-Authenticate` header says which, and points to the sign-in metadata |
| `403`  | `onboarding_required` | The account isn’t set up yet. Open [deeperesearch.com](https://deeperesearch.com/) to finish, then reconnect                                                                    |
| `413`  | `body_too_large`      | The request body is over 4 MB. Attach a smaller file                                                                                                                            |
| `429`  | `rate_limited`        | Too many requests. Wait for the number of seconds in `Retry-After`                                                                                                              |
