Skip to main content
Glama

cancel_perp_order

Destructive

Cancel a specific open perpetual order on HyperLiquid to stop unwanted trades. Provide coin and order ID to close a position you no longer want.

Instructions

Cancel a specific open perp order on HyperLiquid.

Input Schema

NameRequiredDescriptionDefault
coinYesAsset symbol
apiKeyNoGDEX API key for AES encryption
orderIdYesOrder ID to cancel
accountRefNoConnected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat
walletAddressNoControl wallet address
sessionPrivateKeyNoSession private key from sign-in

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: -[
      -  "apiKey",
      -  "walletAddress",
      -  "sessionPrivateKey",
      -  "coin",
      -  "orderId"
      -]New value: +[
      +  "coin",
      +  "orderId"
      +]
  2. First observedv4.11.3

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, so the destructive write profile is covered structurally. The description adds only the word 'open' and says nothing about irreversibility, partial failure, whether an unknown orderId errors or no-ops, or the auth/session requirements implied by the four credential parameters.

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?

A single front-loaded sentence with zero waste; nothing is buried or redundant. It is efficient, though its brevity is partly under-specification rather than tight editing.

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

Completeness2/5

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

This is a destructive, open-world mutation with six parameters including four credential fields and no output schema. The description omits how credentials are supplied, what a successful cancellation returns, and how errors or already-filled orders are handled — significant gaps for a cancel operation.

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%, including the accountRef/credential parameters, so the schema does the heavy lifting. The description contributes no additional meaning about coin formatting, orderId provenance, or how credential parameters combine — baseline 3 applies.

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) and resource (a single open perp order) scoped to HyperLiquid, which separates it from cancel_all_perp_orders and update_order by name alone. It does not explicitly name any sibling, so the differentiation is inferable rather than stated.

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?

No when-to-use, when-not-to-use, or alternative routing is given. An agent must infer on its own that this is for a single order while cancel_all_perp_orders handles bulk, and that the order must still be open.

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