Skip to main content
Glama

position_calculate

Read-onlyIdempotent

Risk-first position sizing with quantity, notional, margin, effective leverage, fees, funding, breakeven, liquidation estimate, target R multiples and warnings. Use position_plan_on_chart instead when the user should see the plan on the chart.

Input Schema

NameRequiredDescriptionDefault
sideYes
stopYes
entryYes
equityYesAccount equity in quote currency.
feeBpsNoFee per side in basis points. Default 4.
targetsNoTake-profit prices and the percentage closed at each. Allocations should total 100.
leverageNoSelected venue leverage. Default 1.
fundingRateNoFunding per settlement as a fraction, e.g. 0.0001.
riskPercentYesEquity risked if the stop fills, in percent.
holdingHoursNoExpected holding time for the funding estimate.
fundingPerDayNoFunding settlements per day. Default 3.
maintenanceMarginRateNoFraction used for approximate liquidation. Default 0.005.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "side",
      -  "equity",
      -  "riskPercent",
      -  "entry",
      -  "stop",
      -  "targets"
      -]New value: +[
      +  "side",
      +  "equity",
      +  "riskPercent",
      +  "entry",
      +  "stop"
      +]
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare this is a pure, idempotent, non-destructive read (readOnlyHint/idempotentHint/destructiveHint), so the safety profile is covered. The description adds real value by disclosing the shape of the result set (it computes fees, funding, breakeven, liquidation estimate and warnings), which matters because there is no output schema. It doesn't discuss assumptions or edge cases of the estimates (e.g. that liquidation is approximate).

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 core purpose and the sibling routing at the end. The long output enumeration is dense but earns its place given the absence of an output schema. No filler sentences.

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 12-parameter calculation with 5 required inputs and no output schema, the description fills the biggest gap by naming the returned metrics, and the annotations cover the safety profile. Remaining gap: it doesn't clarify the required stop/entry/side relationship or what the warnings represent, which an agent would need to invoke it confidently.

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 75%, so most inputs (equity, feeBps, leverage, fundingRate, riskPercent, holdingHours, fundingPerDay, maintenanceMarginRate, targets) are already documented in the schema. The description adds no parameter-level meaning — the nouns it lists map to outputs, not inputs — so it neither compensates for the uncovered fields (entry, stop, side beyond the enum) nor adds syntax guidance.

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+resource ('risk-first position sizing') and enumerates the concrete outputs it produces (quantity, notional, margin, leverage, fees, funding, breakeven, liquidation, R multiples, warnings). It also explicitly contrasts itself with the sibling position_plan_on_chart, so an agent can pick between them without opening either schema.

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 an explicit routing rule: 'Use position_plan_on_chart instead when the user should see the plan on the chart.' That cleanly separates the two sizing tools. It stops short of stating prerequisites (e.g. stop must differ from entry, stop side relative to entry) or when this tool is the wrong choice for other reasons.

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