Skip to main content
Glama

Change an unfilled entry order

amend_entry_order

Change the price, size, stop-loss or take-profit of an entry that has not filled: a limit order or a trigger entry. The new terms pass every check of a new order; a limit order is replaced (losing its queue place), a trigger entry rewritten. Use when the user moves an entry. Not for a held position's stop (use tighten_stop_loss) or take-profits (set_take_profits). Inputs: order_id, symbol, venue, and what changes. Needs trade:execute: if your orders wait for a person's approval, cancel and preview again instead. Next: get_my_open_orders.

Input Schema

NameRequiredDescriptionDefault
priceNoNew limit price, or new trigger price for a trigger entry, USD per coin
venueNoVenue: sandbox, hyperliquid, okx, bybit or binance. Omitted: the agent's only venue, else hyperliquid if connected, else your only connected exchange, else the sandboxhyperliquid
symbolYesBase coin, e.g. BTC
order_idYesAn unfilled entry from get_my_open_orders: a limit entry's order id, or req_… for a trigger entry
size_baseNoNew size in the base coin
stop_lossNoNew stop-loss, USD per coin
take_profitNoNew take-profit, USD per coin

Output Schema

NameRequiredDescriptionDefault
okYesFalse when rejected or failed
feeNoOnce executed: the trading fee, estimated at once and replaced by the amount the exchange charged once its fill records show it
legsNoA ladder entry: per leg {price, size_base, order_id, sl_oid, status}; status resting, or after a refused leg withdrawn, filled or partly_filled
errorNoWhy it was rejected or failed
venueNoVenue name
checksNoChecks run at execution
sl_oidNoVenue order id of the protective stop
statusYespending_approval, armed (a trigger entry waiting for its price), executed, rejected, failed, expired, declined, cancelled, or executing (TradeHub has not confirmed the outcome yet: check get_order_status)
receiptNoSigned receipt (compact JWS, EdDSA) once executed: request, checks, preview price, fill, slippage, order ids, delegation. Verify with /.well-known/tradehub-receipts.jwks
order_idNoVenue order id of the fill
cancelledNocancel_order with all_waiting_entries: the order ids withdrawn (venue ids and req_… trigger entries); [] when nothing was waiting
fill_priceNoAverage fill, USD per coin
request_idYesOrder request id; get_order_status(request_id) follows it
deprecationNoPresent only while this tool is deprecated: replacement, removal_date, changelog
filled_sizeNoFilled size, in the base coin (e.g. BTC), not USD
take_profitsNoset_take_profits: the take-profits now on the exchange
trigger_priceNostatus armed: opens at market when the mark reaches this, USD per coin
trigger_expires_atNostatus armed: when it lapses unless reached, ISO 8601 UTC
approval_expires_atNoWhile pending: when the approval request lapses, ISO 8601 UTC

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past the annotations: it discloses that new terms re-run every check of a new order, that a limit order is replaced and loses its queue place while a trigger entry is rewritten, and that trade:execute scope is required. The queue-position loss is exactly the kind of non-obvious side effect the destructiveHint=false flag alone would not convey, and it is consistent with idempotentHint=false.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and front-loaded: purpose first, then exclusions, then inputs, then permission caveat, then the natural next call. The telegraphic, colon-chained style ("Inputs:", "Next:") packs a lot but forces the reader to parse fragments rather than sentences, which slightly hurts readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter mutation with an output schema present, everything an agent needs is covered: identity, scope, required scope, the non-destructive replacement behavior, an approval-workflow fallback, and a follow-up call. Return values are correctly left to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds partial-update semantics — only "what changes" is supplied, and the new terms are validated like a fresh order — which explains why price/size/stop_loss/take_profit are optional and nullable. It does not add format or unit detail beyond the schema, but the update semantics are a genuine semantic contribution.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (change price/size/stop-loss/take-profit of an unfilled entry) plus the exact object scope: limit order or trigger entry. It also names what it is not — a held position's stop or take-profit — which separates it from tighten_stop_loss and set_take_profits without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger condition ("Use when the user moves an entry"), two explicit exclusions with the correct sibling named for each, and an alternative path when approval workflows block execution (cancel and preview again). Nothing about when to reach for this tool versus a sibling is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources