Skip to main content
Glama

Close CEX position

close_position
Destructive

Close an open CEX futures position (or reduce it) with a reduce-only market order. Real money. Needs the trade:execute scope AND user YOLO eligibility; per-call kill-switch/autonomy check. NEVER touch positions the user marked manual unless explicitly asked.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "exchange": "<exchange>",
      "pair": "<pair>",
      "side": "<side>"
    },
    "name": "close_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairYese.g. BTC/USDT
sideYesSide of the OPEN position
sizeNoBase units to close; omit to close the entire position, or pass a smaller amount to reduce partially
exchangeYesCEX slug, e.g. kucoin
connectionIdNoCEX connection id (see list_connections). Takes precedence over exchange.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare destructive, non-idempotent, open-world, non-read-only, but the description adds materially new behavioral facts: real money, required scope plus YOLO eligibility, a per-call kill-switch/autonomy gate, and a hard prohibition on touching manually marked positions. Those are exactly the operational and authorization details annotations cannot express.

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?

Three dense sentences, front-loaded with the action and mechanism, then money/auth, then the guardrail. No filler or restatement of the name.

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 high-risk mutation tool with no output schema, the definition covers action, order type, permissions, autonomy gating and the manual-position safeguard. It stops short of noting what a successful call returns (e.g., order id or fill status), which would help an agent verify the close.

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% and the schema already explains pair, side, size, exchange and connectionId, including the connectionId-precedence rule. The description only implicitly touches parameters via 'or reduce it', so there is little added meaning beyond the schema.

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?

The description states a specific verb and resource ('Close an open CEX futures position') plus the mechanism ('reduce-only market order'), which pins the behavior down precisely. It does not name a sibling such as propose_close_all_positions, so the agent gets no explicit disambiguation between this and the bulk/proposal variants.

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?

It gives clear preconditions (trade:execute scope, user YOLO eligibility, per-call kill-switch/autonomy check) and an explicit exclusion ('NEVER touch positions the user marked manual unless explicitly asked'). Missing is a pointer to which alternative to use when the user wants to close everything or wants a proposal rather than direct execution.

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.