Skip to main content
Glama

Basis

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

TableJSON Schema
NameRequiredDescriptionDefault
sideYes
stopYes
entryYes
equityYesAccount equity in quote currency.
feeBpsNoFee per side in basis points. Default 4.
targetsYesTake-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. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds value by listing the full set of computed outputs and noting that warnings are produced, which goes beyond the structured annotations. It does not describe internal calculation details or edge cases, but for a pure calculation tool this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with zero waste. The first sentence front-loads the tool's purpose and output list, and the second provides a routing directive. Every word earns its place, making it easy to scan and act on.

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 calculation tool with 12 parameters and many outputs, the description lists the outputs explicitly, which is the primary missing piece an agent would need. It does not explain how parameters interplay or what 'risk-first' means, but the schema covers most parameter semantics, and annotations cover side effects. No output schema exists, so the description's output list partially compensates. Overall adequate, though it could mention required inputs or units.

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%, meaning most parameters (9 of 12) already have descriptive text. The description itself does not add parameter-specific semantics; it only lists outputs. For the 25% without schema descriptions (side, stop, entry), the description offers no clarification, but these are fairly self-explanatory (side has an enum, stop/entry are numeric prices). Given high schema coverage, a baseline of 3 is appropriate.

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?

The description clearly states the tool computes risk-first position sizing and enumerates the specific outputs (quantity, notional, margin, effective leverage, fees, funding, breakeven, liquidation estimate, target R multiples, warnings). It also distinguishes itself from the sibling position_plan_on_chart by naming the alternative, so an agent can tell them apart without inspecting schemas.

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?

The description gives an explicit exclusion: 'Use position_plan_on_chart instead when the user should see the plan on the chart.' This provides a concrete when-not condition and names the alternative. However, it does not enumerate other potential alternatives (e.g., position_draw_on_chart) or state explicit conditions for when to choose this tool over others, leaving some context implicit.

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