Skip to main content
Glama
XBTFX

XBTFX MCP Trading Server

by XBTFX

close_position

Destructive

Close open trading positions by ticket number for full or partial exits. Specify volume for partial closes or omit for complete position liquidation.

Instructions

Close an open position by ticket. Omit volume for full close, or specify volume for partial close.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketYesPosition ticket number
volumeNoPartial close volume in lots (omit for full close)
commentNoClose comment, max 27 ASCII chars
idempotency_keyNoUnique key to prevent duplicate close on retry. Auto-generated if omitted.
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: it explains the volume parameter's optionality and its effect (full vs. partial close). Annotations already indicate this is a destructive, non-read-only operation, but the description clarifies the specific closing behavior. No contradictions with annotations exist.

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 is perfectly concise with two sentences that each earn their place: the first states the core purpose, the second explains the key parameter behavior. It's front-loaded with essential information and wastes no words.

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 destructive operation with no output schema, the description provides adequate context about the closing behavior. It could be more complete by mentioning potential outcomes (e.g., success/failure responses) or error conditions, but given the good annotations and clear purpose, it's mostly sufficient.

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?

With 100% schema description coverage, the schema already documents all parameters thoroughly. The description adds minimal value by clarifying volume's optionality and effect, but doesn't provide additional syntax, format, or semantic details beyond what's in the schema 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 clearly states the specific action ('close an open position'), identifies the resource ('by ticket'), and distinguishes from siblings by specifying partial vs. full close behavior. It differentiates from close_all, close_by, and close_symbol by focusing on ticket-based closure.

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 provides clear context about when to use this tool (closing by ticket) and distinguishes between full and partial closes. However, it doesn't explicitly state when to use alternatives like close_all or close_by, nor does it mention prerequisites like needing an open position with the given ticket.

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/XBTFX/xbtfx-mcp-server'

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