Skip to main content
Glama

close_perp_position

Close a specific perpetual futures position with a reduce-only market order. Specify coin, size, and price to exit all or part of the position.

Instructions

Close a specific perp position using a reduce-only market order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesAsset symbol to close
sizeYesSize to close (use full position size for 100% close)
priceYesPrice for the close order
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

B3.3/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 burden. It usefully discloses that the close is executed as a reduce-only market order, implying immediate fill and that the position cannot be flipped — meaningful behavioral context. It omits auth/session requirements (apiKey, sessionPrivateKey are required), irreversibility, and slippage exposure on a market order.

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?

One sentence, front-loaded with the action and resource, then the execution mechanism. No filler, nothing an agent must skip past.

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 mutation tool with six required parameters (including credentials), no annotations, and no output schema, the description is thin. It never explains the sign-in/session-key prerequisite or what a successful close returns, leaving the agent to infer the invocation prerequisites from the schema alone.

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% with all six parameters documented, so the schema does the heavy lifting and baseline is 3. The description adds nothing per-parameter, and it creates mild tension by calling the order a 'market order' while the schema documents a required 'price' parameter without clarifying its role in a market execution.

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?

Specific verb+resource: closes a perp position, with the qualifier 'specific' hinting it targets one position rather than all. The 'reduce-only market order' detail further distinguishes it from open_perp_position. However, it never names close_all_positions or place_perp_order as the contrasting siblings, so an agent must infer the boundary.

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?

The description states what the tool does but gives no when-to-use guidance, no preconditions, and no routing to alternatives such as close_all_positions (full portfolio exit) or place_perp_order (partial/custom close). The 'specific' qualifier is the only implicit selection signal.

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