Skip to main content
Glama

Arm position exits

set_exits
Destructive

Arm or replace venue-native SL and/or TP on an open CEX position (spot or futures across binance, bybit, okx, kucoin, gateio, mexc, bitget, bingx, coinbase, kraken). Clears existing stops on the pair and arms the new legs sized against the live position. Needs trade:execute + YOLO eligibility.

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>"
    },
    "name": "set_exits"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairYese.g. BTC/USDT
marketNoWhich market the open position is on (default futures). Spot needs quantity.
slPriceNoStop-loss trigger. Must sit on the loss side of the entry (long: below, short: above).
tpPriceNoTake-profit trigger. Must sit on the profit side of the entry (long: above, short: below).
exchangeYesCEX slug, e.g. binance, bybit, okx, kucoin, gateio, mexc, bitget, bingx, coinbase, kraken
quantityNoSpot only: position size in base units (the venue reports no spot position to size against)
connectionIdNoCEX connection id (see list_connections). Takes precedence over exchange.
referencePriceNoThe price the stop and take-profit were DERIVED FROM. The server rebases both legs onto the position's ACTUAL entry price, keeping their distances, so a fill that came in better than the reference cannot leave a take-profit on the wrong side of the entry (where its trigger is already satisfied and it would close the position instantly for a fee).

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 flag destructive/non-idempotent/open-world, yet the description adds the crucial specifics: existing stops on the pair are cleared, new legs are sized against the live position, and eligibility/auth requirements apply. That is exactly the extra context an agent needs before a destructive mutation.

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?

Two dense sentences, front-loaded with the action and scope, followed by side effects and prerequisites. The venue list is long but functional; nothing is redundant.

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?

Given eight parameters, a destructive mutation, and no output schema, the description covers action, side effects, and auth. It could still say what the caller receives on success or how partial failures (SL succeeds, TP fails) are handled, but it is otherwise sufficient to call safely.

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%, including a detailed explanation of referencePrice rebasing, so the schema carries the parameter burden. The description only adds the general note that legs are sized against the live position, which does not meaningfully extend the per-field documentation.

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 specific verb pair (arm/replace) and resource (venue-native SL and/or TP) scoped to an open CEX position, and enumerates the supported venues. An agent can distinguish this from order-placement or close tools purely from the text.

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

Usage Guidelines3/5

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

Prerequisites are given ('Needs trade:execute + YOLO eligibility') and the precondition of an open position is implied, but there is no explicit when-to-use-vs-alternative routing (e.g. versus a bracket proposal or close_position) and no statement of when not to call it.

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.