Skip to main content
Glama

close_all_positions

Close all open perpetual positions on HyperLiquid in one action. May be unreliable, so prefer closing per-coin for a more dependable result.

Instructions

Close all open perpetual positions on HyperLiquid. Note: may be unreliable — prefer closing per-coin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyYesGDEX API key for AES encryption
walletAddressYesControl wallet address
sessionPrivateKeyYesSession private key from sign-in

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.11.3

TDQS

A3.9/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 unreliability ('may be unreliable'), which is real behavioral value, but it omits that this is a destructive/irreversible mutation and says nothing about auth requirements or scope ('all' across what set of coins/dexes).

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 short sentences with zero waste: the action is front-loaded and the reliability caveat follows immediately. Every sentence earns its place.

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 bulk-mutation tool with no annotations and no output schema, the description warns about unreliability but leaves gaps: irreversibility, auth expectations (implied only by the required params), and the exact scope of 'all' positions are not addressed.

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 all three parameters (apiKey, walletAddress, sessionPrivateKey) are already documented in the schema. The description adds no parameter meaning beyond that, making the baseline 3 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 and resource with scope: 'Close all open perpetual positions on HyperLiquid.' The 'all' distinguishes it from the singular sibling close_perp_position 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 Guidelines4/5

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

The note 'prefer closing per-coin' gives an explicit alternative to this tool, which routes the agent toward close_perp_position. However, it states a preference without spelling out the conditions under which this tool is still the right choice, so it falls short of a full when/when-not 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