Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Max Leverage

workflow.run_max_leverage
Read-only

Calculate the maximum safe leverage based on account size, max acceptable drawdown, and asset daily volatility. Use when user asks "what's the max leverage I should use on BTC?" or "how much leverage is safe given 3% daily volatility?". Returns: maxLeverage (maxDrawdownPct / (volatilityPct + mmr x 100), rounded down to 0.1, never below 1x), marginAtRisk (accountSize x maxDrawdownPct / 100, in USDT), safeMargin (USDT) and liquidationBuffer (percent). maxDrawdownPct and volatilityPct are percents (10 means 10%); mmr is a fraction (0.005 is 0.5%).

Input Schema

NameRequiredDescriptionDefault
mmrNoMaintenance margin rate, default 0.005 (0.5%)
accountSizeYesTotal account size in USDT
volatilityPctYesExpected daily price volatility as percentage, e.g. 3 for 3%
maxDrawdownPctYesMaximum acceptable drawdown as percentage, e.g. 10 for 10%

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false and destructiveHint=false, so safety is covered; the description adds real value on top by exposing rounding behavior (down to 0.1), the hard floor (never below 1x), and the exact derived quantities. It could still note that volatility is user-supplied rather than fetched live, but the openWorldHint=false annotation covers the non-networked nature.

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-loads purpose, then usage examples, then the return contract and unit conventions — a sensible order with no filler sentences. It is dense, and the formula plus return list make it longer than average, but every sentence carries operational information.

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?

With no output schema and no annotations describing return shape, the description compensates by naming all four returned fields (maxLeverage, marginAtRisk, safeMargin, liquidationBuffer) and their units. Nothing an agent needs to call or interpret this calculator 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 baseline is 3, and the description goes beyond the schema by explicitly disambiguating units: maxDrawdownPct and volatilityPct are percents (10 means 10%) while mmr is a fraction (0.005 is 0.5%). That unit guidance is the single most error-prone aspect of this tool and it is stated plainly.

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 ("Calculate the maximum safe leverage") plus the exact inputs it depends on (account size, max drawdown, daily volatility). This clearly separates it from the many adjacent risk siblings such as run_liquidation_safety or run_position_sizing, which answer related but different questions.

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?

Provides concrete user-phrasing triggers ("what's the max leverage I should use on BTC?", "how much leverage is safe given 3% daily volatility?"), which is strong context for invocation. It stops short of naming any competing sibling or stating when NOT to use it, so no explicit alternatives are given.

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.