Skip to main content
Glama

Stop loss

place_stop_loss

Place a reduce-only Stop loss (conditional market order) that triggers at triggerPrice. Side must be the CLOSING side of the position: SELL closes a LONG, BUY closes a SHORT. Once triggered it executes as an IOC limit bounded at triggerPrice ± slippageBps in the direction of execution (BUY above the trigger, SELL below; default 500 bps) so the close can cross the book.

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": {
      "market": "<market>",
      "side": "<side>",
      "triggerPrice": "<triggerPrice>",
      "size": "<size>"
    },
    "name": "place_stop_loss"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYes
sizeYes
marketYes
clientIdNo
slippageBpsNoExecution bound past the trigger, in bps (default 500). Raise for thin books, up to the server maximum (whoami.configuredLimits.maxSlippageBps).
triggerPriceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / slippageBps / description
      Previous value: -"Execution bound past the trigger, in bps (default 500). Raise for thin books."New value: +"Execution bound past the trigger, in bps (default 500). Raise for thin books, up to the server maximum (whoami.configuredLimits.maxSlippageBps)."
  2. Changed1 schema field changed
    • addedInput schema / properties / market / pattern
      Added value: +"^[A-Z0-9]{1,20}-[A-Z0-9]{1,20}$"
  3. Changed1 schema field changed
    • addedInput schema / properties / slippageBps
      Added value: +{
      +  "description": "Execution bound past the trigger, in bps (default 500). Raise for thin books.",
      +  "maximum": 10000,
      +  "minimum": 0,
      +  "type": "number"
      +}
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnly=false, idempotent=false and destructive=false; the description goes well beyond that by explaining the two-stage lifecycle (conditional trigger, then IOC limit at triggerPrice ± slippageBps) and the direction of the execution bound (BUY above, SELL below the trigger). It does not say whether the resting stop can be modified, what happens if the trigger fires with insufficient margin, or what the call returns.

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?

Front-loaded with the core action, then the side rule, then execution mechanics; every clause carries information. The second sentence is dense and stacked with parentheticals, which slows parsing slightly, but nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an order-placement mutation with no output schema and low schema coverage, the description covers trigger and execution semantics well. It omits the units/format of size, the market symbol convention (visible only via a regex pattern), the purpose of clientId, and any indication of what is returned or how to later cancel the resting stop.

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 only 17%, and the description compensates partially: it explains triggerPrice's role, the required side mapping, and slippageBps' default of 500 bps and directional meaning. Three of six parameters — market, size and clientId — receive no meaning from either source, so the compensation is incomplete.

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 and resource ('Place a reduce-only Stop loss (conditional market order)') plus the exact trigger condition. This clearly separates it from place_limit_order, place_market_order and place_take_profit without needing the sibling schemas.

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?

The side rule ('SELL closes a LONG, BUY closes a SHORT') is an actionable usage constraint that prevents a common error, and 'reduce-only' signals it cannot open exposure. However, it never explicitly says when to prefer this over place_take_profit or close_position, and no preconditions (existing position required, margin checks) are stated.

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.