---
title: "Errors"
description: "What a failed tool call returns, what the common error codes mean, and what to send support."
url: "https://sellify.ai/docs/developers/errors"
---

# Errors

> What a failed tool call returns, what the common error codes mean, and what to send support.

A tool call that fails comes back as a normal MCP result with `isError` set to `true`. Its text is written for a person or a model to act on.

## Error format

The text has these lines, and the optional ones appear only when they apply:

```text
This call can cost up to 73 credits, more than the 50 allowed by max_credits.
Invalid fields:
- productId: Invalid UUID
Fix: Retry with max_credits of at least 73, or ask for less output.
More: https://app.sellify.ai/...
Error code: mcp_max_credits_below_price
```

- **The first line** says what went wrong.
- **Invalid fields** lists the inputs that failed validation, when that was the problem.
- **Fix** says what to change.
- **More** links to a page with more detail, when there is one.
- **Error code** is stable. Match on it in code, not on the message.

Every result also carries a request ID in `_meta`, under the key `sellify/requestId`. Keep it when you contact support.

Problems before a tool runs, like a missing or invalid key, come back as HTTP errors instead of tool results.

## Common error codes

| Code                             | What it means                                                                    | What to do                                                                               |
| -------------------------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `action_input_invalid`           | An input failed validation. The Invalid fields lines name each one.              | Fix the listed fields and retry.                                                         |
| `mcp_max_credits_invalid`        | `max_credits` is missing, out of range, or sent to a free tool.                  | Send a number above 0 and at most 10,000 for paid tools, and leave it out for free ones. |
| `mcp_max_credits_below_price`    | The call can cost more than `max_credits`.                                       | Retry with a higher `max_credits`, or ask for less output.                               |
| `mcp_daily_credit_limit_reached` | The key or connection used its daily credit limit.                               | Wait for the reset at midnight UTC, or use a key with a higher limit.                    |
| `mcp_write_requires_admin`       | The connection belongs to a workspace member, and writes need an owner or admin. | Use a key or sign-in from an owner or admin.                                             |
| `mcp_idempotency_key_invalid`    | The `idempotency_key` is empty or too long.                                      | Send a non-empty string of up to 200 characters.                                         |
| `mcp_confirmation_required`      | The call needs a person's confirmation.                                          | Show the question, then retry with the `confirmation_token` after they say yes.          |
| `mcp_confirmation_token_invalid` | The confirmation token is wrong, expired or for a different call.                | Start the call again to get a new token.                                                 |
| `mcp_confirmation_declined`      | The person said no.                                                              | Don't retry unless they ask again.                                                       |

Billing problems, like not enough credits, a product limit or no active plan, come back with a **Fix** line and a link to the workspace billing page.

## Failures you can retry

If a call fails with an unexpected error, retry it once. If you sent an `idempotency_key`, retrying is safe. If it fails again, contact support with the request ID.

If a result says the action ran but its result couldn't be returned, don't retry. Check the result in Sellify first.

## Related

[Credits and limits](https://sellify.ai/docs/developers/credits-and-limits) · [Authentication](https://sellify.ai/docs/developers/authentication) · [MCP tool reference](https://sellify.ai/docs/developers/mcp-tools)
