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

# Record and price errors

> Errors for missing records, invalid fields and missing prices.

These codes cover a record that is missing, taken or in use, a field that is invalid, and prices that are missing. For every code, the result carries `error_code` and `message`; see [MCP errors](https://docs.allocait.app/claude/errors.md) for the other fields.

| Code | Meaning |
| - | - |
| `INVALID_INPUT` | A field is missing or malformed, or the change isn't allowed. |
| `NOT_FOUND` | The id or name doesn't exist, or isn't yours. |
| `ALREADY_EXISTS` | A create used a name that's already taken. |
| `IN_USE` | A delete was refused because something still uses the record. |
| `CONFIRMATION_REQUIRED` | The call would remove something it didn't name. |
| `PRICES_INCOMPLETE` | Symbols still need a price. |
| `PRICES_INVALID` | A price you passed was negative or wasn't a number. |

## Records and fields

**INVALID\_INPUT**

A field is missing or malformed, a list has a duplicate, or the change isn't allowed, such as renaming a system class or Cash. For a CHOICE input, the message lists the allowed options. Fix the field and try again. A read tool refuses a field name that looks like a misspelling of one it takes, such as `price` for `prices`, and names the likely match. An unknown tool name gets the nearest real one.

`INVALID_INPUT` also covers these cases, by tool.

**`check_trades`**

* A change with both or neither of `shares` and `notional`, or more than 50 changes.
* A `SELL` larger than the shares held (with Allow shorts off), or a `SELL` that takes an option holding below zero.
* A trade in an option that has expired (it counts 0, so nothing is checked).
* A change worth 100000000000000 or more.
* A symbol the portfolio doesn't hold sent without `asset_class`.
* A portfolio worth nothing or less at the prices you gave.

The message names the change's position and symbol.

**`check_allocations`**

* A negative `CASH` entry (`CASH cannot be negative. Cash is never held below zero.`).
* A percentage beyond plus or minus 1000000.

**Holdings writes**

* A negative `shares` when Allow shorts is off (`Share count cannot be negative while Allow shorts is off.`) or for an option holding (`Options are held long only, so a count cannot be negative.`).
* A `moves` other than 1 on an Options holding (`Moves applies to stocks and funds, not to cash or options.`).
* A `mark` on a holding that is not an option (`A mark applies to options only.`) or outside 0 to 1000000000.
* A trade too large to record (`That trade is too large to record.`).

The error lists the refused `symbols`.

**`calculate_position_size`**

* A `direction` other than `long` or `short`.

**NOT\_FOUND**

The id or name doesn't exist, or isn't yours. For a name, `valid_values` lists the choices. After a repeated delete, it means the record is already gone.

**ALREADY\_EXISTS**

A create used a name that's already taken. The error carries the existing id: change that record with its `save_` tool instead. A create with a name that's already taken returns this instead of a second record with that name.

**IN\_USE**

A delete was refused because something still uses the record. The message names what: an asset class used by holdings or rules, or an input used by a monitor. Turning Allow shorts off is refused the same way while a short is held: the message says how many to close first, and the error carries `short_count` and `symbols`.

**CONFIRMATION\_REQUIRED**

The call would remove something it didn't name. Either a list you sent would drop stored members, and `would_remove` lists them: to keep them, add them to the list you send; to drop them, ask the user, then send the call again with those members in `remove`. Or the `confirm_name` for a portfolio or scenario delete doesn't match: ask the user to confirm the name.

## Prices

On the agent surface, prices for values and checks come only from the caller, and a tool that needs one and has none fails instead of guessing. The snapshot's `standing` is the one place that reads Allocait's last stored quote, and it shows no price.

**PRICES\_INCOMPLETE**

The message names the exact symbols still needed, and `missing` lists them. For `check_trades`, `prices` must cover every held non-cash symbol and every changed symbol. A held option with a mark needs none. Ask the user for those prices, or use a price source they trust, and call the tool again. With no price to be had, the call has no result.

**PRICES\_INVALID**

A price you passed was negative or wasn't a number. 0 is a valid price for a holding, for example an option that expired worthless. An expired option counts 0 whatever you pass. A symbol in a `check_trades` change needs a price above 0.

## Next steps

> [card] [Prices](https://docs.allocait.app/concepts/prices.md)
>
> How an agent supplies prices.

> [card] [Check result](https://docs.allocait.app/concepts/check-result.md)
>
> What a check returns.

> [card] [All MCP errors](https://docs.allocait.app/claude/errors.md)
>
> Find another code.


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