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

# Limits and errors

> Rate limits, the tool error shape, the preview and confirm flow for scheduling, the workspace argument and credit costs.

## Rate limits

Tool calls are limited per assistant and user:

| Window | Limit |
| - | - |
| Per minute | 60 tool calls |
| Per day | 2000 tool calls |

The count is kept per OAuth client and user, so two assistants you connect each have their own budget. Past the limit a call returns the `rate_limited` error with `details.retryAfterSeconds`. Limits for registration, authorization and client metadata fetches are on the [Authentication](/mcp/authentication.md) page.

## Tool errors

A tool that fails still returns a normal result, with `isError: true`. The error is in `structuredContent.error`, and the text content repeats it in one line for the model.

```json
{
  "isError": true,
  "content": [{ "type": "text", "text": "Error (insufficient_credits): Not enough credits: this needs 5 and 2 are left. Top up in Settings → Billing." }],
  "structuredContent": {
    "error": {
      "code": "insufficient_credits",
      "message": "Not enough credits: this needs 5 and 2 are left. Top up in Settings → Billing.",
      "details": { "needed": 5, "balance": 2, "action": "post.generate_text" }
    }
  }
}
```

`code` and `message` are always present. `details` appears when there is more to say. The `action` value in the example is illustrative.

| Code | Meaning |
| - | - |
| `validation_error` | Some arguments are not valid. `details.issues` lists each path and message. |
| `workspace_required` | The connection has several workspaces and no `workspace` was passed. `details.workspaces` lists them. |
| `workspace_ambiguous` | Several workspaces have that name. Pass the id. |
| `not_found` | The post, workspace or other item does not exist for this connection. A workspace outside your grants is also `not_found`. |
| `forbidden` | The role, the workspace state or a lock blocks the call. `details.reason` can be `role` or `workspace_locked`. |
| `plan_limit` | The plan does not include this, or a plan limit is reached. |
| `subscription_required` | A plan is required (trial expired, canceled, or none). |
| `insufficient_credits` | Not enough credits. `details` has `needed`, `balance` and `action`. |
| `rate_limited` | Too many requests. Wait `details.retryAfterSeconds`. |
| `conflict` | The request conflicts with the current state, for example `post_locked` for an approved post. |
| `external_error` | A service PostChamp depends on failed. Try again. |
| `internal_error` | Something unexpected. The message is generic. |

Tool-specific problems carry their own codes, shown in each [tool page](/mcp/tools/index.md).

### Errors that are not tool results

* **Unknown or disallowed tool.** A tool name that does not exist, is not on this endpoint, or is outside the client's allowlist fails as a protocol error (JSON-RPC `-32602`).
* **No or bad token.** `401` with `WWW-Authenticate: Bearer resource_metadata="…", scope="mcp"`, plus `error="invalid_token"` when a token was sent. A token without the `mcp` scope gets `403`. The JSON body is `{ "error": { "code": "unauthorized", "message": "…" } }`.
* **Wrong method.** Anything other than `POST` gets `405`.
* **Bad origin.** `403` with `Origin not allowed.`
* **Assistants unavailable.** `503` with `Assistants are not available right now.`

## Preview and confirm

Nothing is posted right away. The scheduling tools work in two steps:

* `schedule_post`
* `reschedule_post`
* `schedule_posts` (up to 31 posts at once)

**1. Preview**

The assistant calls the tool without `confirm`. The result has `kind: "preview"` and `confirmRequired: true`, with the workspace, the LinkedIn account, each post's day, time and time zone, a `previewToken`, and `expiresAt`. Nothing is scheduled. Any `problems`, such as a time less than a minute ahead or a LinkedIn account that needs reconnecting, are listed per post.

**2. You agree**

The assistant shows you the preview. Only after you say yes does it continue.

**3. Confirm**

The assistant calls the same tool again with `confirm: true` and the exact `previewToken`. PostChamp schedules the post and returns `kind: "scheduled"`.

The token is signed and bound to the tool, your user, the assistant, the workspace and the LinkedIn account. It expires after 10 minutes and works once. If anything changed since the preview, the post text, time, media, first comment, status or LinkedIn account, or the token expired or could not be read, PostChamp schedules nothing and returns a fresh preview with `changed: true` and a `changes` list. `confirm: true` without a token also only returns a preview.

> [!NOTE]
>
> A post that is already scheduled is reported as `already_scheduled` and not moved. Use `reschedule_post` to move it. Posts in approval cannot be scheduled from an assistant.

## The workspace argument

Every tool accepts an optional `workspace`: a workspace id or its exact name (case-insensitive).

* With **one** granted workspace you can leave it out.
* With **several**, pass it on every call. Without it you get `workspace_required` and the list of choices. `list_workspaces` shows them.
* A name shared by two workspaces gives `workspace_ambiguous`: use the id.
* A value outside your grants gives `not_found`, never a hint that it exists.
* Some read tools can answer across all granted workspaces when `workspace` is left out.

## Credits

Tools that do AI work use credits at the same price as in the app, from the same balance. Reading data and saving text you wrote is free. A failed generation is not charged. The Credits column in the [tool table](/mcp/tools/index.md) shows each cost, and `check_credit_balance` returns the balance. When the balance is too low the call returns `insufficient_credits`.

## Timeouts

Tools that run a model, such as `generate_post`, may take minutes. The server allows up to 300 seconds per request. Access tokens expire after 60 minutes; assistants refresh them without asking you.

## Related

> [card] [Tool reference](/mcp/tools/index.md)
>
> All tools with credit costs.

> [card] [Authentication](/mcp/authentication.md)
>
> Tokens, consent and revoking.
