Skip to main content
Glama

Which leverage survived a coin's normal swings

leverage_survival
Read-onlyIdempotent

Tests every hour of roughly the last 1,000 hours as an entry on real hourly prices of a coin and reports, for 2x to 100x, the share of entries that would have been liquidated within the holding time by normal price swings (isolated margin), and the highest leverage that 90% and 99% of entries survived. Use it to answer 'what leverage is safe for this coin?' with data.

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": {
      "coin": "<coin>"
    },
    "name": "leverage_survival"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYesTicker, e.g. BTC, ETH, SOL.
sideNoPosition direction to test. Default long.
hold_hoursNoHow long the position is held. Default 24.
maintenance_margin_pctNoMaintenance margin in percent. Default 0.5.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / maintenance_margin_pct / description
      Previous value: -"Default 0.5."New value: +"Maintenance margin in percent. Default 0.5."
    • changedInput schema / properties / side / description
      Previous value: -"Default long."New value: +"Position direction to test. Default long."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Goes well beyond annotations by disclosing the methodology (hourly sampling over ~1,000 hours, real hourly prices, isolated margin) and what the output contains (liquidation share per leverage and 90%/99% survival thresholds). Remaining gaps are runtime concerns like computational cost or behavior on coins with short history.

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?

Two sentences, front-loaded with the sampling methodology and followed by the use case; every clause carries information. The long first sentence stacks several clauses, but nothing is redundant.

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?

With no output schema, the description adequately explains what is returned: per-leverage liquidation shares and 90%/99% survival leverage. Missing edge-case behavior (insufficient history, default sweep assumptions) keeps it from a 5, but an agent can call it correctly.

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 documents coin, side, hold_hours and maintenance_margin_pct with examples, enums and bounds. The description adds context for holding time and isolated-margin framing but no syntax or format meaning beyond that, so baseline 3 applies.

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: it backtests every hour of the last ~1,000 hours as an entry on real hourly prices and reports liquidation share across 2x-100x plus the highest leverage survived by 90%/99% of entries. This is clearly different from siblings like liquidation_price (single position) or position_size.

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?

Gives an explicit intended question: 'what leverage is safe for this coin?' with data, which tells the agent when to reach for it. It does not name alternatives or state when not to use it (e.g. use liquidation_price when you already fixed leverage), so it stops short of full routing guidance.

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.