Skip to main content
Glama
nexus-xyz

nexus-exchange-mcp

Official
by nexus-xyz

cancel_order

Cancels one resting order by order_id and market_id; requires API credentials. Use this for a single order, not to cancel all open orders.

Instructions

Cancel ONE resting order by order_id. market_id is required (the route uses it for routing). This tool only ever cancels the single named order; to cancel every open order use cancel_all_orders. Requires API credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesId of the order to cancel.
market_idYesMarket the order rests on (required for routing).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.4.0
    • removedInput schema / properties / cancel_all
      Removed value: -{
      -  "description": "Set true to cancel ALL open orders. Required (and the only way) to trigger a mass-cancel; ignored when `order_id` is given.",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / market_id / description
      Previous value: -"Market id. REQUIRED when cancelling a single order (`order_id`); optional with `cancel_all` to scope the mass-cancel to one market."New value: +"Market the order rests on (required for routing)."
    • changedInput schema / properties / order_id / description
      Previous value: -"Order id to cancel a single order."New value: +"Id of the order to cancel."
    • changedInput schema / required
      Previous value: -[]New value: +[
      +  "order_id",
      +  "market_id"
      +]
  2. Changed3 schema fields changed
    • addedInput schema / properties / cancel_all
      Added value: +{
      +  "description": "Set true to cancel ALL open orders. Required (and the only way) to trigger a mass-cancel; ignored when `order_id` is given.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / market_id / description
      Previous value: -"Market id (recommended when cancelling a single order)."New value: +"Market id. REQUIRED when cancelling a single order (`order_id`); optional with `cancel_all` to scope the mass-cancel to one market."
    • changedInput schema / properties / order_id / description
      Previous value: -"Order id to cancel. Omit to cancel ALL open orders."New value: +"Order id to cancel a single order."
  3. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that API credentials are required (auth need) and clarifies the market_id routing requirement, but does not describe mutation side effects (e.g., whether cancellation is immediate, what happens if the order is already filled, or error behavior).

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

Conciseness5/5

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

Three short sentences, front-loaded with the core action and scope, then routing constraint, then alternative and auth note. No filler or repetition.

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?

For a two-required-parameter mutation tool with no output schema and no annotations, the description covers auth, scope, routing, and the alternative tool. It omits some failure-mode context, but is sufficient for correct invocation.

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

Parameters3/5

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

Schema coverage is 100%, so both parameters are already documented. The description reinforces that market_id is required for routing, but adds no syntax or format beyond what the schema provides; baseline 3 is appropriate.

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 (Cancel) and resource (one resting order by order_id), and explicitly distinguishes itself from the sibling cancel_all_orders. An agent can identify the exact operation without opening the 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?

Explicitly states the tool only ever cancels the single named order and names the alternative (cancel_all_orders) for cancelling everything, giving a clear when-to-use-this-vs-alternative rule.

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

Deploy Server

Other Tools