Skip to main content
Glama

CoinRithm Agent Trading

Set futures stop-loss / take-profit

set_futures_sl_tp
Idempotent

Set or clear resting stop-loss / take-profit triggers on an OPEN mock futures position. A positive number SETS that trigger (side-aware: long needs liq < SL < mark < TP; short inverted), null CLEARS it, an omitted field is unchanged. Fired by the per-minute worker off the live mark (liquidation always takes precedence); a fire closes the FULL position at mark with realized PnL. Discover fills between polls via my_trades with updatedSince. Requires the trade:futures scope. Paper trading only — virtual funds (50,000 mUSD). Not financial advice. Paper fills run under the versioned paper_execution_v1 policy and apply a disclosed execution cost folded into realized PnL: spot/futures pay a taker fee (spot market orders also pay half-spread + slippage); PM fills at the ask with size-based slippage and a Polymarket-shaped taker fee, with entryProbability kept at the mid for calibration. See the executionModel in quote/trade results — a rehearsal cost, not an exchange fill guarantee.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentTraceNoOptional private trace metadata stored in the caller's ledger.
positionIdYesOpen futures position id.
stopLossPriceNoPositive number sets; null clears; omit = unchanged.
takeProfitPriceNoPositive number sets; null clears; omit = unchanged.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesTrue when CoinRithm returned a successful 2xx response.
bodyNoParsed CoinRithm response body, or raw text when the response is not JSON.
httpStatusYesHTTP status returned by CoinRithm, or 0 for network errors.
ledgerStatusNoLedger write status header returned by CoinRithm, when present.
ledgerEventIdNoPrivate AgentActionEvent id returned by /api/agent/*, when present.

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses detailed behavioral traits: triggers fired by per-minute worker, liquidation precedence, full position closure on fire, fill discovery via my_trades, execution costs, and that the executionModel is a rehearsal cost not a guarantee. Annotations already indicate idempotency and non-destructive, and description aligns perfectly.

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 front-loaded with the core operation, then provides necessary details in a structured manner. While it is lengthy, every sentence adds essential information about behavior, constraints, and execution. It could be slightly trimmed, but it earns its length.

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 the complexity (side-awareness, paper trading, execution model), the description covers almost all aspects: scope, constraints, fill discovery, cost implications, and that output is a rehearsal. It assumes some background knowledge (e.g., mark), but is complete for the tool's purpose.

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

Parameters4/5

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

With 100% schema description coverage, the baseline is 3. The description adds valuable context beyond the schema: side-aware ordering for SL/TP, the meaning of null/omitted values, and the requirement that positionId refers to an open position. This enriches the agent's understanding.

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 starts with a specific verb and resource: 'Set or clear resting stop-loss / take-profit triggers on an OPEN mock futures position.' It clearly distinguishes from siblings like close_futures_position and open_futures_position by focusing on SL/TP adjustment on an already open position.

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 explains the side-aware ordering (long needs liq < SL < mark < TP, short inverted) and the effect of null/omitted fields. It also states the required scope ('trade:futures') and that it's for paper trading only. However, it does not explicitly state when not to use this tool, though sibling context implies alternatives.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct resource or action (e.g., spot vs futures vs PM, quote vs open vs close, different PM data endpoints). Descriptions provide clear context and usage guidance, eliminating ambiguity.

Naming Consistency5/5

All tools follow a verb_noun pattern in snake_case (e.g., `cancel_spot_order`, `open_futures_position`, `pm_data_event`). Even `whoami` is a common exception. Naming is uniform and predictable.

Tool Count4/5

35 tools is on the high side but appropriate for a multi-venue trading platform covering spot, futures, prediction markets, analytics, and account management. Each tool serves a distinct purpose, though minor consolidation could be possible.

Completeness5/5

The tool surface covers the full trading lifecycle: quotes, order placement, cancellation, position management, SL/TP, portfolio tracking, performance, and extensive market data. No obvious gaps for the stated purpose.