Skip to main content
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 for the other fields.

Records and fields

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.
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.
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.
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.
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.
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.
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

Prices

How an agent supplies prices.

Check result

What a check returns.

All MCP errors

Find another code.