Skip to main content
Glama

Leverage survival

leverage_survival
Read-onlyIdempotent

What a leveraged trade actually did, opened on every single day of the history instead of the one day that worked. Give coin, side, leverage and holding period: you get the share of those days that ended liquidated, the median outcome, the best day, and what the same coin did with no leverage at all. Real perpetual tape, with the funding that was actually paid charged daily and eating into margin. Coins that blew up included.

Use when the question involves leverage, perpetuals or liquidation. For the fall an unleveraged holder sits through use drawdown_check; for two or three coins at once, coin_comparison.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesTicker or full pair. An unknown one comes back with the list we hold and the ones we do not.
daysYesHow long it is held: 1, 7, 30 or 90.
sideNolong or short. Defaults to long.long
leverageYes2, 3, 5, 10, 20, 25, 50 or 100.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNofalse when we do not hold that data. Never a zero standing in for an answer.
errorNono_data when ok is false.
modelNoThe assumptions, stated: liquidation at exactly 1/leverage with no maintenance margin, funding charged daily, the wick decides not the close.
reasonNoWhy, in one sentence, and what we do have instead.
sourceNoThe public file these numbers come from.
attemptsNoStarting days tested. A position still open when the history ends is not counted.
best_pctNoThe best day. It is the one you were shown, and it is not hidden here.
liquidated_pctNoShare of them that ended with nothing left.
median_return_pctNoThe middle outcome, on the margin.
median_days_to_liquidationNoHow fast, when it happened.
median_return_unlevered_pctNoWhat the same coin did with no leverage over the same days. A result without this is advertising.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / days / enum
      Added value: +[
      +  1,
      +  7,
      +  30,
      +  90
      +]
    • addedInput schema / properties / leverage / enum
      Added value: +[
      +  2,
      +  3,
      +  5,
      +  10,
      +  20,
      +  25,
      +  50,
      +  100
      +]
    • addedInput schema / properties / side / default
      Added value: +"long"
    • addedInput schema / properties / side / enum
      Added value: +[
      +  "long",
      +  "short"
      +]
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses key behavior: real perpetual tape, daily funding charged into margin, inclusion of coins that blew up, and the counterfactual every-day simulation rather than cherry-picked dates. This gives the agent material context for trusting and interpreting results.

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?

The description is front-loaded with the core simulation concept, then adds data realism and edge-case behavior, then routing guidance. Despite being longer than a minimal definition, every sentence carries useful information for this complex tool.

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?

The output schema exists, so return values need not be fully documented, yet the description still summarizes key outputs. Combined with annotations covering safety and the description covering methodology, input use, edge cases, and sibling routing, it is complete for correct invocation.

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 100%, so the schema already defines coin, days, side, and leverage, including enums and defaults. The description names these inputs, but does not add syntax, constraints, or meaning 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?

The description concretely states that this tool simulates opening a leveraged trade on every historical day and reports outcomes like liquidation share, median, best day, and unleveraged comparison. It clearly distinguishes itself from siblings by naming drawdown_check and coin_comparison for adjacent questions.

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?

It explicitly says to use it when the question involves leverage, perpetuals, or liquidation, and it routes the agent to drawdown_check for unleveraged falls and coin_comparison for multi-coin comparisons. Both when-to-use and alternatives are named.

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