Skip to main content
Glama

SocialForex

Position size calculator

calculate_position_size
Read-only

Lot size so that hitting the stop loss loses riskPct % of the balance. Account currency is assumed to be USD.

Input Schema

NameRequiredDescriptionDefault
entryYes
symbolYese.g. EURUSD, XAUUSD, USDJPY
balanceYesAccount balance in USD
riskPctYesRisk per trade in %, e.g. 1
leverageNoe.g. 500 for 1:500 — adds required margin
stopLossYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds one genuinely useful behavioral fact — account currency is assumed USD — which affects interpretation of balance and risk amounts. It does not disclose what the result contains (lot size only, or margin as well when leverage is supplied), which matters for a calculator.

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?

Two short sentences, front-loaded with the core formula and followed by the currency caveat. Every clause carries information; nothing is padding.

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?

For a pure calculation tool with no output schema, the description should state what comes back — a lot size, and presumably required margin when leverage is given. The USD assumption is a good catch, but the missing return-value description and the unexplained optional leverage leave a real gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67% with entry and stopLoss undocumented in the schema; the description compensates by explaining the relationship between entry, stopLoss, riskPct and balance that determines the output. The USD assumption also disambiguates the balance parameter. It still says nothing about how leverage feeds into the result, so it is not a 5.

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 states a specific computed resource — lot size — and ties it to a precise formula: loss at stop loss equals riskPct % of balance. That is far more informative than the title 'Position size calculator' alone. It doesn't need sibling differentiation because the siblings (quotes, calendar, sessions) are unrelated market-data tools, but it never explicitly names the compute operation.

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 statement of when to use this versus manually sizing a trade, no prerequisites, and no mention of what happens when the optional leverage parameter is omitted. The only guidance is the USD currency assumption, which is a constraint rather than usage direction.

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.