Skip to main content
Glama

open_perp_position

Destructive

Open a perpetual futures position on HyperLiquid with leverage, take-profit, and stop-loss via market or limit orders.

Instructions

Open a perpetual futures position on HyperLiquid with leverage, TP/SL. Supports market and limit orders.

Input Schema

NameRequiredDescriptionDefault
coinYesAsset symbol, e.g. 'BTC', 'ETH', 'SOL'
sizeYesPosition size in contracts
priceYesPrice in USD
apiKeyNoGDEX API key for AES encryption
isLongYesTrue for long, false for short
slPriceNoStop-loss price in USD, '' to skip
tpPriceNoTake-profit price in USD, '' to skip
isMarketNoTrue for market order, false for limit
leverageNoLeverage 1-50 (sent top-level; HL defaults to 20x if omitted)
accountRefNoConnected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat
reduceOnlyNoReduce-only order
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",
      -  "isLong",
      -  "price",
      -  "size"
      -]New value: +[
      +  "coin",
      +  "isLong",
      +  "price",
      +  "size"
      +]
  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?

Annotations already declare readOnly=false, destructive=true, and openWorld=true, so the safety profile is covered. The description adds HyperLiquid venue context and market/limit, TP/SL, and leverage support, but does not add auth/session requirements or side-effect details beyond annotations and schema.

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 no wasted text. Every clause contributes to scope or capability.

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?

With 13 parameters, a destructive trading action, no output schema, and many sibling tools, the description is somewhat thin on account/session flow and alternative selection. Schema and annotations cover much structured detail, but the description does not fully compensate for the missing usage/output context.

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 baseline is 3. The description mentions leverage, TP/SL, and market/limit orders, but adds no syntax or constraints beyond what the schema already documents for all 13 parameters.

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?

Names a specific verb and resource (open perpetual futures position) plus venue and order features (HyperLiquid, leverage, TP/SL, market/limit). It does not differentiate itself from sibling order-entry tools such as place_perp_order or execute_cross_perp/execute_isolated_perp, so it falls short of a 5.

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?

States what the tool does but gives no explicit when-to-use or when-not-to-use guidance and does not route between alternatives. An agent can infer it opens positions, but must choose between open_perp_position, place_perp_order, execute_cross_perp, and execute_isolated_perp without help.

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