Skip to main content
Glama

Position size calculator

position_size
Read-only

Position size from entry, stop and the USDT you are willing to lose, rounded to the contract's step, with margin, fees, loss at the stop and a warning if liquidation comes before the stop.

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": {
      "symbol": "<symbol>",
      "side": "<side>",
      "entry": "<entry>",
      "stop": "<stop>",
      "risk_usdt": "<risk_usdt>",
      "leverage": "<leverage>"
    },
    "name": "position_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYes
stopYes
entryYes
symbolYesCoin of a USDT perpetual contract, e.g. BTC, ETH, SOL (BTCUSDT also works).
leverageYes
risk_usdtYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already establish this is a pure, safe, offline calculation (readOnlyHint=true, openWorldHint=false), and the description goes further by disclosing the actual response contents — margin, fees, loss at the stop, and a liquidation-before-stop warning — plus the rounding behavior to the contract's step. That is genuine behavioral value beyond the annotations, with no contradiction.

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?

A single dense sentence with the core computation front-loaded and the return contents trailing, with no filler. It borders on a run-on, but every clause (rounding, margin, fees, liquidation warning) carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 does a good job of enumerating what comes back, which is the main completeness risk for a calculator. It is still incomplete on the two most consequential unlabeled inputs (side, leverage) and on how the liquidation warning is triggered, so an agent cannot fully reason about edge cases before calling.

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 coverage is only 17% (just symbol), so the description carries most of the burden; it usefully glosses risk_usdt as 'the USDT you are willing to lose' and ties entry/stop to the size calculation. However, it says nothing about side or leverage, and leverage is the parameter that most directly drives margin and the liquidation warning, leaving a meaningful gap.

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?

It names a specific computation (position size) and enumerates the exact inputs it derives it from (entry, stop, USDT at risk) plus the derived outputs, so an agent knows precisely what the tool returns. It is clearly distinguishable from the read-only market-data siblings (fear_greed_index, funding_history, etc.) by being a calculator, though it never explicitly contrasts itself with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not guidance, and no mention of related siblings such as liquidation_price or preflight_link that an agent might otherwise reach for. Usage is only inferable from the input list (you would call it when planning a trade with a known entry, stop and risk budget).

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