Skip to main content
Glama

close_position

Destructive

Use this when the user asks to close (fully or partially) an open Hyperliquid position. Risk-reducing: works whenever agent trading is armed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoPartial close size in coins. Omit to close the entire position
symbolYesCoin symbol of the open position, e.g. BTC

TDQS

A4.2/5.0
Behavior4/5

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

The description adds behavioral context beyond the annotations: it is explicitly risk-reducing and available when agent trading is armed. This complements the destructiveHint=true annotation by explaining that the destructive action is a position reduction, not an unrelated destructive operation.

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, purposeful sentences. The primary trigger condition is front-loaded, and the risk/availability note adds useful guidance without waste.

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

Completeness4/5

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

For a simple two-parameter tool with clear annotations and full schema coverage, the description covers the key invocation context and behavior. It does not describe return values, but the absence of an output schema and the simple nature of the operation make this acceptable.

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 schema already documents both parameters well. The description's mention of 'fully or partially' loosely maps to the size parameter but does not add new meaning beyond the schema's existing descriptions.

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?

The description names a specific action (close), a specific resource (an open Hyperliquid position), and the exact user intent that triggers it (fully or partially). It is clearly distinguishable from siblings like place_order or cancel_order.

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 description states the condition for use ('when the user asks to close...') and adds the operating condition ('works whenever agent trading is armed'). It does not explicitly mention when not to use it or name an alternative, but the trigger condition is clear and specific.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool maps to a distinct resource/action: market data, account state, resting orders, audit records, fills, order placement, and risk management. The only close pair, preview_order and place_order, is clearly delineated as validation vs execution.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern (get_, place_, cancel_, close_, set_). The object names are uniform and predictable, making the set easy to navigate.

Tool Count5/5

13 tools is well-scoped for a trading server: market data, account/order queries, execution, and position risk each have coverage without redundancy or bloat.

Completeness4/5

The surface covers the core trading lifecycle: market data, account, preview/place/cancel, close position, TP/SL, and historical records. Minor gaps exist (e.g., no modify-order operation and no standalone position detail endpoint), but agents can work around them via cancel/replace and get_my_account.

Resources