Skip to main content
Glama

Stop loss check

stop_loss_check
Read-onlyIdempotent

Whether a stop-loss would have helped, measured. The same buy of a coin, held 30, 90, 365 or 730 days, with a stop 5, 10, 15, 20 or 30% below the entry and without one, started on every day of the history. The stop fires on the day's low, not its close, and fees are charged to both. You get how often it fired, how often it sold a buy that would have ended in profit, and the worst case of each. Spot tape, dead coins included.

Use when asked whether a stop-loss protects a spot buy-and-hold. For leveraged positions, where liquidation is the stop, use leverage_survival; for a rule with a stop and a take-profit, strategy_grid_lookup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesTicker or full pair. An unknown one comes back with the list we hold and the ones left out.
daysYesHolding period in days: 30, 90, 365 or 730.
stopYesHow far below the entry, in percent: 5, 10, 15, 20 or 30. 0.05 is read as 5.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNofalse when we do not hold that data. Never a zero standing in for an answer.
buysNoStart days tested. Fewer than 120 and we refuse to give a percentage.
errorNono_data when ok is false.
modelNoThe assumptions, stated: the low triggers, fills at the stop or the gap open, out until the end, same costs both ways.
reasonNoWhy, in one sentence, and what we do have instead.
sourceNoThe public file these numbers come from.
stop_firedNoBuys on which the stop fired. A count.
try_insteadNoWhen ok is false: the closest call that does answer, ready to send (tool, arguments, and what changed).
same_coin_inNoWhen ok is false because this tool lacks the coin: the other tools that hold it, each with arguments ready to send.
stop_fired_pctNoThe same as a share of buys.
p05_with_stop_pctNoFifth percentile, with the stop: what the stop actually buys.
stop_beat_holdingNoBuys on which the stop ended strictly ahead of holding.
mean_with_stop_pctNoAverage buy, with the stop.
median_days_to_fireNoAmong the buys it fired on. Null when it never fired.
worst_with_stop_pctNoThe single worst buy, with the stop. Worse than the stop itself only when a day gapped through.
median_with_stop_pctNoMiddle buy, with the stop.
p05_without_stop_pctNoThe same, holding.
mean_without_stop_pctNoAverage buy, holding. Skewed by a few huge winners.
stop_beat_holding_pctNoThe same as a share of buys.
worst_without_stop_pctNoThe same, holding.
median_without_stop_pctNoMiddle buy, just holding. The alternative, always.
share_in_profit_with_stop_pctNoShare of buys that ended up, stop.
share_in_profit_without_stop_pctNoThe same, holding.
fired_but_would_have_ended_in_profitNoBuys the stop sold that, held to the end, would have ended in profit after fees. The half nobody shows.
fired_but_would_have_ended_in_profit_pctNoThe same as a share of ALL buys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "coin": "btc",
      +    "days": 365,
      +    "stop": 5
      +  }
      +]
    • addedOutput schema / properties / same_coin_in
      Added value: +{
      +  "description": "When ok is false because this tool lacks the coin: the other tools that hold it, each with arguments ready to send.",
      +  "type": "array"
      +}
    • addedOutput schema / properties / try_instead
      Added value: +{
      +  "description": "When ok is false: the closest call that does answer, ready to send (tool, arguments, and what changed).",
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / days / enum
      Added value: +[
      +  30,
      +  90,
      +  365,
      +  730
      +]
    • addedInput schema / properties / stop / enum
      Added value: +[
      +  5,
      +  10,
      +  15,
      +  20,
      +  30
      +]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/non-destructive, but the description goes well beyond: it discloses the simulation internals (stop fires on the day's low not the close, fees charged to both, every day of history as a start date, spot tape with dead coins included) and the outputs returned. This is exactly the context annotations cannot carry.

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?

Dense but front-loaded: the core purpose leads, the mechanics follow, and the sibling routing sits last. Some sentences are long and packed, but each earns its place by adding behavioral detail rather than restating the name or schema.

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

Completeness5/5

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

For a three-parameter analytical tool with full schema coverage, an output schema, and rich annotations, the description supplies everything else an agent needs: scope (spot, dead coins included), mechanics, and correct routing to alternatives. Nothing material is missing.

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 enum values and the '0.05 is read as 5' convention are already documented. The description still adds meaning the schema lacks: it frames days as the holding period and stop as the distance below entry, and clarifies that every day of history is used as a start date, which shapes how the parameters are interpreted.

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 (a measured backtest of whether a stop-loss helps a spot buy-and-hold) and immediately distinguishes itself from siblings by naming leverage_survival and strategy_grid_lookup as the alternatives for leveraged or stop+take-profit cases. An agent can route correctly without opening any schema.

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

Usage Guidelines5/5

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

Explicitly says when to use it ('asked whether a stop-loss protects a spot buy-and-hold') and names the two competing tools with the conditions that select them (leveraged positions/liquidation vs. stop+take-profit rules). Nothing is left to inference.

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.

Resources