> ## Documentation Index
> Fetch the complete documentation index at: https://www.landbase.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP error and recovery reference

> Recover Landbase MCP authentication, permission, rate, confirmation, and async errors.

MCP errors are returned by the client or tool call. Read the error code and preserve any identifiers before retrying. See [MCP troubleshooting](https://www.landbase.com/docs/guides/mcp/troubleshooting.md) for symptom-based recovery.

## For AI agents

* `401`: reconnect or complete OAuth; do not ask the user to paste a token into chat.
* `403`: verify account and permission scope; do not guess a different account.
* `402` or `needs_confirmation`: show the quote and ask for approval before the supported confirmation call.
* `429`: wait and retry only a read/status call; do not duplicate a paid start.
* `503` or timeout: recover the existing handle or run ID before retrying.
* `PUBLISH_REQUIRED`: publish the dataset before requesting the operation that requires it.
* `CANCELLED`: inspect the terminal result; do not claim that cancellation rolled back completed work.

## Structured error example

```text theme={null}
Explain this MCP error, identify the operation that is safe to retry, and preserve any returned dataset or workflow identifier.
```

```json theme={null}
{
  "code": "needs_confirmation",
  "message": "Approval is required before enrichment.",
  "account_id": "5093",
  "dataset_id": "ds-7f3c2a",
  "quote": {"rows": 20, "credits": 20}
}
```

For an in-progress search, call `get_search_result`; for an agent run, call `get_agent_run` or `wait_for_agent_run`; for a workflow, call `get_workflow_run`. For connection and permissions, see [Connect to Landbase MCP](https://www.landbase.com/docs/guides/mcp/get-started-with-mcp.md).

## Recovery reference

| Code or condition | Safe next step |
| - | - |
| `401` | Reconnect OAuth or complete authorization. Never request a token in chat. |
| `403` | Verify the selected account and permission scope. Do not guess another account. |
| `402` / `needs_confirmation` | Show the quote and wait for explicit approval before repeating the supported call with confirmation. |
| `429` | Honor the retry delay and retry only a read or status call. |
| `503` / timeout | Recover the existing search handle, agent run, or workflow run before starting anything new. |
| `PUBLISH_REQUIRED` | Publish the dataset, poll its workflow, then request a download using the output dataset ID. |
| `CANCELLED` | Inspect the terminal result; cancellation does not guarantee rollback of completed work. |

Branch on the structured MCP error object and its returned identifiers rather
than treating a missing response as a failed operation.

## Retry rules

Read/status calls are generally safe to retry with the same account and opaque
identifier. Paid starts, uploads, publishes, downloads, deletes, and
confirmations must be recovered or shown as completed/failed before repeating.
If a response was lost, a missing response is not evidence that the operation
did not start.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.