Skip to main content
Glama

Position size calculator

calculate_position_size
Read-onlyIdempotent

Position size from the stop: how many shares to buy (or short) so that a stop-out loses a set percentage of the account. Computed with the same function as Clear Tape's free position size calculator page (linked in the result), not estimated. Returns the inputs, each result with its unit, the formula and the page link. Educational, not investment advice.

Input Schema

NameRequiredDescriptionDefault
langNoLanguage of the returned text: "en" (default) or "zh" (Simplified Chinese).en
stopYesStop price per share in USD. Below the entry for a long, above it for a short; not equal to the entry.
entryYesEntry price per share in USD.
accountYesAccount size in USD.
riskPctYesRisk per trade, percent of the account (1 = 1%). Above 0, at most 100.

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?

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description adds real context beyond them: results are deterministic and identical to the linked calculator page rather than estimated, and the output carries units and the formula. The educational/not-advice disclaimer is an extra scoping note absent from the annotations.

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?

Front-loaded with the core definition, then result shape, then the disclaimer. Four sentences with little waste, though 'linked in the result' and the trailing educational note are slightly loose together.

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 no output schema, the description compensates by describing the return payload (inputs, each result with its unit, formula, page link), and the deterministic-source claim answers the obvious trust question. Missing only guidance on failure cases, such as stop equal to or on the wrong side of entry.

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 all five parameters, including the lang enum and the long/short relationship between entry and stop, are already documented in the schema. The description only gestures at 'the inputs' without adding new semantics, so the baseline 3 applies.

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?

States a specific computation: shares to buy or short such that a stop-out loses a given percentage of the account, which is distinct from sibling calculators like calculate_risk_reward or calculate_atr_stop. The verb+resource pairing is clear, though it never names a sibling to route against.

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 the input set (account, risk %, entry, stop) and the disclaimer that it is educational, but there is no explicit when-to-use, no prerequisites, and no naming of alternatives such as calculate_risk_reward or calculate_atr_stop for related needs.

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