Skip to main content
Glama
Orderly Trading MCP

Orderly Trading MCP

Official

Close a position

positions_close
Destructive

Close a perpetual futures position using a reduce-only MARKET order: omit quantity to exit fully, specify it for a partial close, and set dry_run=true to preview the payload.

Instructions

Close a position with a reduce-only MARKET order. Omit quantity to close the full position; pass quantity for a partial close. Perpetual futures only — use predict_close for Orderly Predict. Preview with dry_run=true.

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": {
      "symbol": "<symbol>"
    },
    "name": "positions_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
symbolYessymbol
accountNoAccount ID (auto-resolves if single account)
dry_runNoPrint the request payload without signing or sending it
networkNoNetwork override for this call. Defaults to ORDERLY_MCP_NETWORK, then the CLI config.
quantityNoPartial close quantity (default: full position)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.5

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is known; the description adds genuinely new behavior — the order type is MARKET and reduce-only, so sizing/slippage semantics and partial-versus-full closing are disclosed. It stops short of stating auth/key requirements or what happens on partial fills.

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?

Three tight sentences with the primary action and order type front-loaded, then quantity semantics, then the scope exclusion and preview hint. Every sentence carries information, though the dry_run tip could sit adjacent to the quantity sentence for tighter flow.

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 five-parameter destructive mutation with no output schema, the description covers mechanism, full/partial behavior, venue scope, and a preview workflow. It leaves open what the call returns (order ID, fill status) and any permission prerequisites, which an agent calling a closing tool may want.

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 quantity ('default: full position'), dry_run, network, and account are already documented. The description reinforces the quantity-omission behavior but adds no format or constraint detail beyond the schema, matching the baseline for fully documented 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?

States a concrete verb and resource ('Close a position') plus the execution mechanism ('reduce-only MARKET order'), which immediately distinguishes it from order_place or order_cancel in the sibling set.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use rules ('Omit quantity to close the full position; pass quantity for a partial close'), an exclusion plus named alternative ('Perpetual futures only — use predict_close for Orderly Predict'), and a safe-preview path via dry_run=true.

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