Skip to main content
Glama

trade_close

Close an existing position by first previewing the impact using the opposite side of the trade, then requiring user confirmation.

Instructions

Close an existing position. IMPORTANT: Call trade_preview first with the opposite side to show impact, then get user confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exchangeYesExchange: pacifica, hyperliquid, lighter, or aster
symbolYesSymbol to close (e.g., BTC, ETH)
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only states 'Close an existing position,' implying state mutation, but lacks details on side effects, error conditions, required permissions, or rate limits.

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?

The description consists of two concise sentences: a clear purpose statement and an important usage directive. Every word is necessary, and it is front-loaded effectively.

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?

The description is adequate for a simple tool with two parameters and no output schema, covering the core action and a critical precondition. However, it lacks details on return values, error handling, or post-close state.

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?

The parameters 'exchange' and 'symbol' are fully described in the schema (100% coverage). The description does not add additional semantic information beyond what the schema provides, meeting the baseline expectation.

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 explicitly states 'Close an existing position,' which is a clear verb+resource pair, and the IMPORTANT note distinguishes this from sibling tools like trade_preview and trade_execute.

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 includes an explicit directive: 'Call trade_preview first with the opposite side to show impact, then get user confirmation.' This clearly indicates the precondition and workflow, though it does not explicitly exclude other scenarios.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hypurrquant/perp-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server