Skip to main content
Glama

The Spice Melange Trading Desk: DeepBook market data connector

Build: cancel DeepBook order(s)

build_cancel_order_tx
Read-only

Cancel one order (order_id) or all your orders in a pool, and withdraw settled amounts into your BalanceManager. Returns UNSIGNED tx bytes (simulated against mainnet). Non-custodial: the desk never sees or holds keys and never moves funds; it returns quotes and UNSIGNED transactions only. Spot only, no leverage. Education only, not financial advice.

Input Schema

NameRequiredDescriptionDefault
poolYesDeepBook pool BASE_QUOTE, e.g. SUI_USDC
senderYesYOUR Sui address (0x...). Public address only; never send a key.
order_idNo
balance_manager_idYesYOUR DeepBook BalanceManager id (0x + 64 hex), from build_create_balance_manager_tx effects

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent/destructive, so the fact that this returns bytes rather than executing is partly covered. The description adds genuinely non-redundant context: it returns UNSIGNED transaction bytes simulated against mainnet, keys are never held, and funds are never moved by the desk. It does not, however, note whether cancelling is reversible or what happens to partially-filled orders.

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?

Front-loaded with the action and scope, then the return contract and safety caveats. The 'Spot only, no leverage' and 'Education only, not financial advice' clauses are near-boilerplate, but the sentence count is small and nothing is buried.

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

Completeness4/5

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

No output schema exists, and the description carries the key return contract (unsigned tx bytes, mainnet simulation) plus the non-custodial safety model, which is what an agent needs before calling. Remaining gaps — error/edge behavior and the exact downstream signing step — are minor for a tx-builder tool.

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 75%, with order_id carrying no schema description beyond maxLength. The description compensates by explaining that order_id selects the single-order mode versus the all-orders mode, adding semantic meaning the schema lacks. Pool/balance_manager_id semantics are left entirely to the schema, which covers them adequately.

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

Purpose4/5

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

States a specific verb and resource ('Cancel one order (order_id) or all your orders in a pool') plus the side effect (withdraw settled amounts into BalanceManager) and the return shape (UNSIGNED tx bytes). It is immediately distinguishable from read-side siblings like get_order_book or quote tools, though it never names a sibling (e.g. build_limit_order_tx) to contrast against.

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

Usage Guidelines3/5

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

It implies the call-time mode switch — pass order_id to cancel one order, omit it to cancel all orders in the pool — which is useful framing. However there is no explicit when-to-use/when-not guidance, no prerequisite ordering relative to build_create_balance_manager_tx or build_bm_deposit_tx, and no stated alternative tool for related flows.

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.