Skip to main content
Glama

cancel_all_perp_orders

Destructive

Cancel all open perpetual orders on HyperLiquid to clear active exposure and prevent unwanted fills.

Instructions

Cancel all open perp orders on HyperLiquid.

Input Schema

NameRequiredDescriptionDefault
apiKeyNoGDEX API key for AES encryption
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"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "apiKey",
      -  "walletAddress",
      -  "sessionPrivateKey"
      -]
  2. First observedv4.11.3

TDQS

B3.3/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the safety profile is covered. Beyond that the description adds nothing: it does not say the cancellation is irreversible, which account's orders are affected, whether it spans all markets, or what the agent gets back. No contradiction with annotations.

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?

A single front-loaded sentence with zero filler; the destructive scope ('all open perp orders') appears immediately. Nothing to trim, nothing buried.

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?

Minimally adequate for a destructive bulk-cancel: the schema carries 100% parameter documentation and annotations carry the safety profile, and no output schema exists to explain. However, with zero required parameters declared, the description should have clarified the auth/account binding (accountRef vs walletAddress) and the blast radius of 'all'.

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% and the description adds no parameter detail (nothing about accountRef, walletAddress, apiKey, or sessionPrivateKey). Baseline 3 applies: the schema fully documents the parameters, so the description neither helps nor hurts here.

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), resource (open perp orders), scope (all), and venue (HyperLiquid) in one sentence. The 'all' explicitly separates it from the sibling cancel_perp_order, so an agent can route between the bulk and single-order tools without opening either schema.

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 framing at all: nothing says when to prefer this over cancel_perp_order, close_all_positions, or direct_cancel_order, and no prerequisite (e.g. needing a connected account or active session) is mentioned. The only guidance is implicit in the word 'all'.

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