Skip to main content
Glama

direct_cancel_order

Destructive

Cancel an open HyperLiquid order by providing the coin and order ID with a private key or connected account. Use it when an agent must close an unwanted order directly.

Instructions

Cancel an open order directly with a private key on HyperLiquid.

Input Schema

NameRequiredDescriptionDefault
coinYesAsset symbol
orderIdYesOrder ID (numeric)
accountRefNoConnected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat
privateKeyNoWallet private key (hex)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.12.0
    • addedInput schema / properties / accountRef
      Added value: +{
      +  "description": "Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "privateKey",
      -  "coin",
      -  "orderId"
      -]New value: +[
      +  "coin",
      +  "orderId"
      +]
  2. First observedv4.11.3

TDQS

B3.3/5.0
Behavior3/5

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

The annotations already declare the operation destructive, non-read-only, and open-world. The description adds useful auth context by saying the cancellation is performed directly with a private key on HyperLiquid, but it does not explain irreversibility, failure behavior, or why one would use privateKey versus accountRef.

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?

The definition is a single front-loaded sentence with no redundant words. Its brevity is appropriate, and any missing detail is a completeness issue rather than verbosity.

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

Completeness3/5

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

For a destructive trading mutation, the description gives the essential action, venue, and auth method. However, it omits important operational context such as when to use accountRef instead of privateKey, what kind of open order is meant, and what the agent should expect after cancellation.

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 description coverage is 100%, so the schema already documents coin, orderId, accountRef, and privateKey. The description only reinforces the private-key path and adds no syntax, constraints, or meaning beyond the schema.

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?

The description states a specific verb (cancel), resource (open order), platform (HyperLiquid), and auth method (private key), so the tool's basic purpose is clear. It does not explicitly differentiate itself from sibling cancellation tools such as cancel_perp_order, cancel_all_perp_orders, or hl_cancel_outcome_order.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no when-not-to-use guidance, and no named alternatives. The word 'directly' hints at a direct private-key signing path, but the agent must infer when to choose this over managed or session-based cancellation tools.

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