Skip to main content
Glama

position_close

Close all or part of a trading position by specifying a quantity or percentage. Use to reduce or exit positions in your portfolio.

Instructions

Close all or part of one position by quantity or percentage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qtyNo
agentNomcp
symbolYes
accountYes
percentNo
idempotency_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action (closing) and the method (quantity or percentage), but does not disclose side effects, whether qty and percent are mutually exclusive, or the execution nature (e.g., market order, fees). This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It efficiently conveys the core action. However, given the tool's complexity (6 parameters, no annotations), it might benefit from additional sentences to cover key behavioral details, though the existing sentence is appropriately concise.

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

Completeness2/5

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

The description is minimal for a tool with 6 parameters, 2 required, and no annotations. It does not cover critical usage nuances like when to use qty vs percent, idempotency behavior, or the requirement of account/symbol. The presence of an output schema somewhat lessens the need to describe returns, but the overall context is insufficient for safe and correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must clarify parameters. It only hints at 'quantity or percentage' (qty and percent), but does not explain required parameters account and symbol, nor the purpose of agent, idempotency_key, or the relationship between qty and percent. The schema itself lacks descriptions, so an agent would struggle to correctly set all parameters.

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 uses a specific verb ('Close') and resource ('one position'), and clearly distinguishes its scope ('all or part') and method ('by quantity or percentage'). This differentiates it from sibling tools like position_close_all (which closes all positions) and order_cancel (which cancels orders).

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 clearly implies when to use this tool: to close a single position, either fully or partially. However, it does not explicitly name alternative tools or state when not to use it, such as comparing to position_close_all or order_submit. The context is clear but lacks explicit exclusions.

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/ryanrodrigues25200525-svg/tradingcli'

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