Skip to main content
Glama
mukul8896

trading-mcp-server

by mukul8896

calculate_position_size

Calculate position size so that stop-loss loss equals a specified risk percentage of capital, subject to a maximum size cap.

Instructions

Quantity so the stop-loss loss equals risk_percent of capital, capped by MAX_POSITION_SIZE_PERCENT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
capitalYes
risk_percentYes
entry_priceYes
stop_lossYes
Behavior2/5

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

No annotations provided, so description carries full burden. It mentions the formula and a cap but does not specify behavior for invalid inputs (e.g., negative capital, zero entry price), nor what 'MAX_POSITION_SIZE_PERCENT' is or how it's defined.

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

Conciseness3/5

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

The description is a single sentence, concise but omits crucial information like output description and definition of the cap constant. It is front-loaded but incomplete.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, no annotations, and the description fails to mention what the tool returns (presumably a position size number). It does not cover edge cases or the meaning of the cap, leaving significant gaps for an AI agent.

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

Parameters2/5

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

Schema coverage is 0%, so description must add meaning. It explains how parameters relate (risk_percent of capital, entry_price and stop_loss used for stop distance) but does not clarify units, constraints, or default values for essential parameters like capital.

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 calculates a quantity (position size) based on risk percent, capital, entry price, stop loss, with a cap. It is specific and distinct from sibling tools like calculate_stop_loss or calculate_atr.

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?

No guidance on when to use this tool vs. alternatives (e.g., calculate_position_size vs. other sizing methods). No context on prerequisites or scenarios.

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/mukul8896/trading-mcp-server'

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