Skip to main content
Glama
CoinRithm

CoinRithm/coinrithm-agent-trading

Official

Set futures stop-loss / take-profit

set_futures_sl_tp
Idempotent

Set or clear stop-loss and take-profit triggers on an open mock futures position to manage risk with automated exits.

Instructions

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.

Input Schema

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

Output Schema

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

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

The description discloses significant behavioral traits beyond annotations: triggers are evaluated by a per-minute worker using the live mark price, liquidation takes precedence, a trigger closes the full position at mark with realized PnL, and fill discovery is done via my_trades. Annotations only indicate idempotent and open world hints; the description adds crucial execution details.

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 dense but concise, packing essential information into a single paragraph. It front-loads the main action and then details constraints. Could be slightly more structured (e.g., bullet points) but remains efficient.

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 tool's complexity, the description covers most aspects: preconditions (open position, paper trading), side-aware behavior, trigger evaluation mechanism, scope requirement, and financial disclaimer. An output schema exists, so return values are not needed, but the description explains outcome behavior (position closure).

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?

Schema coverage is 100%, but the description adds extra meaning: side-aware condition for long vs short, the semantics of set/clear/unchanged for stop-loss and take-profit prices. For agentTrace, the description does not add beyond schema, but overall parameter meaning is well-conveyed.

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 tool's purpose: setting or clearing stop-loss/take-profit triggers on an open mock futures position. It distinguishes this from siblings like close_futures_position or open_futures_position by specifying the action (set/clear triggers) and the condition (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 provides clear guidance on when to use: only for open mock futures positions, with side-aware logic. It mentions the requirement for trade:futures scope and that it's paper trading only. While it doesn't explicitly list when not to use, the constraints are well-defined.

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/CoinRithm/coinrithm-agent-trading'

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