Skip to main content
Glama
R2Rlabs

Reins

Official

Set a stop-loss

set_stop_loss

Protect an open perp position by placing an exchange-held stop-loss that closes the whole position at market when triggerPrice is reached. Replaces prior stops and logs your reason.

Instructions

Protect an open position with a stop-loss held on the exchange: once the price reaches triggerPrice, the whole position is closed at market, whether or not you are running at the time. Replaces any stop already on that symbol. Below the market for a long, above it for a short. Logged with your reason, like an order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYesWhy this level: what would have to happen for your view to be wrong, in one or two sentences. A human will read this later.
symbolYesPerp symbol with an open position, for example ETH.
triggerPriceYesPrice at which the position is closed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: the stop is held exchange-side, fires whether or not the user is running, closes at market (slippage implication), is directional per long/short, replaces existing stops, and is logged with a reason. This is exactly the behavioral context an agent needs for a mutation tool.

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 what the tool does and the exchange-held guarantee. Every clause carries information: mechanism, replacement behavior, directional rule, and audit logging. No filler.

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?

Covers mechanism, side semantics, replacement, and logging, and there is no output schema to explain. It does not say what happens on failure (e.g., missing position, invalid trigger relative to market), which is a minor gap for a mutation tool with no annotations.

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% so the baseline is 3, but the description adds directional semantics for triggerPrice ('below the market for a long, above it for a short') that the schema does not capture, plus the framing of reason as a human-readable rationale. That goes beyond what the schema provides.

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+resource (set a stop-loss) and immediately explains the mechanism: an exchange-held stop that closes the whole position at market when triggerPrice is hit. This clearly differentiates it from place_order and close_position, both of which appear as siblings.

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?

Frames the use case ('protect an open position') and adds a critical replacement caveat ('Replaces any stop already on that symbol'), which prevents accidental overwrites. It does not explicitly contrast with place_order/close_position, so an agent must infer that a market order is not the right tool for protective stops.

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