Skip to main content
Glama

leverage calc

leverage-calc

Max safe leverage for a perp trade: liquidation >=1.5x beyond stop (never off), costs vs move, risk per trade, measured survival cap, exchange limit -> min with the binding constraint named Price: $0.30 per call, USDC on Base via x402.

Input Schema

NameRequiredDescriptionDefault
modeNooptional: preserve (default) | target
entryYesnumber
equityYesnumber (USD)
symbolYesstring, e.g. ETHUSDT
stop_lossYesnumber
take_profitNonumber (optional)
risk_per_tradeNonumber (optional, fraction, default 0.02)
exchange_max_leverageNonumber (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does add meaningful behavioral context: it specifies a liquidation buffer of at least 1.5x beyond the stop, includes costs versus move, risk per trade, a survival cap, and the exchange limit, then returns the minimum with the binding constraint named. It also discloses the pricing/payment model via x402, though it does not explicitly state side-effect or idempotency behavior.

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?

The description is front-loaded with the core purpose and then lists the calculation factors and pricing in one dense sentence. It is efficient, but some phrases such as 'measured survival cap' and 'binding constraint named' are compressed and slightly cryptic.

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?

For a complex 8-parameter calculation tool with no output schema and no annotations, the description covers the main computation logic, the key safety constraint, and the payment model. It stops short of explaining optional modes or the exact return shape, but the schema already documents parameter-level details.

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 input schema already documents all eight parameters. The description references the same concepts at a high level but does not add syntax, defaults, or interpretation details beyond what the schema provides; baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific operation: computing max safe leverage for a perpetual futures trade. It enumerates the factors involved (liquidation buffer, costs, risk, survival cap, exchange limit), but it does not differentiate this tool from nearby risk-related siblings such as defi-risk-basic or defi-risk-deep.

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?

Usage is implied by 'for a perp trade,' so an agent can infer that this is for leverage sizing on perpetual futures. However, the description gives no explicit when-to-use versus alternatives, no exclusions, and no routing guidance relative to sibling tools.

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