Skip to main content
Glama
romaco-labs

@romaco/mcp

Official
by romaco-labs

romaco_calculate_position_size

Calculate position size based on account risk management rules: given account size, risk percentage, entry price, and stop loss, returns exact shares to trade, total risk, and position value.

Instructions

Calculate position size based on account risk management rules. Given account size, risk percentage, entry price, and stop loss — returns exact shares/contracts to trade, total risk in dollars, position value, and risk/reward ratio if target is provided. Pure math — no data source or browser needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
riskPctYesMax risk as percentage of account (e.g., 1 = risk 1% = $100 on a $10,000 account). Recommended: 0.5–2%.
stopLossYesStop loss price. Must be below entry for longs, above for shorts.
entryPriceYesPlanned entry price per share/unit
accountSizeYesTotal account value in USD (e.g., 10000)
targetPriceNoTake profit target. Used to calculate risk/reward ratio (optional).
commissionPerSideNoCommission cost per trade side in USD (default 0). Affects net P&L calculation.
Behavior4/5

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

No annotations provided, but description declares it's pure math with no side effects. Clearly states what it returns. Sufficient transparency for a non-destructive calculation.

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 sentences: first states purpose, second details outputs and nature. No wasted words.

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?

Complete for a pure math tool with no output schema. Lists all return values. Could mention synchronous nature, but not necessary.

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 covers 100% of parameters with detailed descriptions. Tool description adds minimal extra beyond listing example inputs and outputs. Baseline 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?

Clearly states it calculates position size based on risk management rules. Lists inputs and outputs. Distinct from sibling tools that focus on chart actions, alerts, etc.

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?

Implicitly indicates when to use (before opening a trade) and that no data source is needed. Could explicitly state 'use this to compute position size' but provides clear context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/romaco-labs/romaco-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server