Skip to main content
Glama

Position risk calculator

position_risk_calc
Read-onlyIdempotent

Liquidation price, distance to liquidation, margin, round-trip fees, funding cost and break-even move for a leveraged long/short. Free: 10 calls/day; then $0.001/call via x402 (MCP params._meta["x402/payment"] or HTTP) or X-API-Key credits.

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": {
      "entryPrice": "<entryPrice>",
      "leverage": "<leverage>",
      "side": "<side>"
    },
    "name": "position_risk_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYeslong | short
feeBpsNotaker fee bps per side (default 5)
sizeUsdNoposition size USD (default 1000)
leverageYes1-200
holdHoursNodefault 24
entryPriceYesentry price
fundingRatePct8hNofunding % per 8h
maintenanceMarginPctNodefault 0.5

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses the free tier (10 calls/day) and the paid path ($0.001/call) with the exact payment mechanisms — params._meta["x402/payment"] or X-API-Key credits. That is genuinely useful operational context an agent cannot get from annotations or schema. It stops short of describing computational assumptions (e.g. how round-trip fees or funding over holdHours are derived).

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, both earning their place: outputs first, cost/auth second. Front-loaded and free of filler, though the opening is a comma-separated noun list rather than a sentence with a verb, which slightly weakens scanability.

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 8 parameters (3 required), full schema coverage, and an output schema that carries the return shape, the description covers purpose, cost, and access. The only real gap is the absence of any note on the calculation model or input validity bounds beyond the schema's own hints.

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% and each parameter carries its own description and example, so the schema does the heavy lifting and a baseline 3 applies. The description adds no parameter-level meaning beyond listing the outputs those parameters feed, and does not clarify interactions such as how holdHours and fundingRatePct8h combine.

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 enumerates exactly what is computed — liquidation price, distance to liquidation, margin, round-trip fees, funding cost, break-even move — scoped to a leveraged long/short. That is specific enough to distinguish it from the unrelated utility siblings, though it never states the action verb ("calculate/compute") and leans on a bare noun list.

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 only implied: an agent can infer the tool is for assessing a leveraged position's risk, and the pricing sentence gives a practical constraint. There is no explicit when-to-use or when-not guidance, no statement of alternatives, and no note on when a simpler check would suffice.

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