Skip to main content
Glama

Cancel all orders in a market

cancel_all_orders
DestructiveIdempotent

Cancel every OPEN order for the subaccount in a market (handles SHORT_TERM and LONG_TERM automatically). Returns confirmation.remainingOpen — orders still OPEN after the cancel (0 = all gone); if > 0, retry.

Input Schema

NameRequiredDescriptionDefault
marketYes
confirmNoAfter canceling, verify no orders remain OPEN via the indexer (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / market / pattern
      Added value: +"^[A-Z0-9]{1,20}-[A-Z0-9]{1,20}$"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuine value beyond that: it discloses the return field `confirmation.remainingOpen`, its meaning (0 = all gone), and a retry condition. It does not mention auth/permission requirements, which would have pushed it higher.

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?

Two tight sentences, front-loaded with the action and scope, followed by the return-value and retry semantics. No filler; every clause earns its place.

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?

With no output schema, explaining the `confirmation.remainingOpen` return value and the retry rule is exactly what is needed, and annotations cover the destructive/idempotent profile. Only the parameter-level details (market format, confirm behavior) are thin, but the core call path is complete.

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 50%: the `confirm` parameter is documented in the schema but `market` only carries a regex pattern. The description clarifies the market scope ('for the subaccount in a market') but does not explain the market format or reference `confirm` at all, so it only partially compensates for the gap.

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 (Cancel) plus resource and scope: 'every OPEN order for the subaccount in a market,' with the extra detail that SHORT_TERM and LONG_TERM are handled automatically. An agent can distinguish this from cancel_order, though the overlap with the sibling batch_cancel is not explicitly addressed.

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?

Usage is implied by the scope ('every OPEN order ... in a market') and there is operational guidance to retry if remainingOpen > 0, but there is no explicit when-to-use/when-not or routing to cancel_order or batch_cancel. The retry note is the only real guidance beyond the name.

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