Skip to main content
Glama
CCXT MCP Server

CCXT MCP Server

by MyronKoch

analytics_position_size

Calculate optimal position size for a planned crypto trade using Kelly Criterion with account balance, win rate, average win/loss, volatility, stop loss, and risk/reward inputs.

Instructions

Calculate optimal position size using Kelly Criterion with risk management

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "accountBalance": "<accountBalance>",
      "entryPrice": "<entryPrice>",
      "winRate": "<winRate>",
      "avgWin": "<avgWin>",
      "avgLoss": "<avgLoss>"
    },
    "name": "analytics_position_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
avgWinYesAverage winning trade amount in USD
avgLossYesAverage losing trade amount in USD
winRateYesHistorical win rate percentage (0-100)
entryPriceYesPlanned entry price
volatilityNoMarket volatility (0.01 = 1%, default: 0.02)
accountBalanceYesTotal account balance in USD
stopLossPercentNoStop loss percentage (default: 0.02 = 2%)
takeProfitRatioNoTake profit ratio (default: 2 = 2:1 risk/reward)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. It does not say whether this is a pure read-only computation, what the output looks like (a size in USD? units? a recommended fraction?), or how 'risk management' modifies the raw Kelly result — all critical for a sizing tool whose output drives real orders.

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?

A single, front-loaded sentence with no filler or redundancy. It is efficient, though its brevity borders on under-specification for an 8-parameter calculation tool.

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

Completeness2/5

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

For a mutation-free but consequential 8-parameter calculation with no annotations and no output schema, the description should explain the return value and the interaction between the Kelly inputs and the optional risk overlays. Neither is covered, leaving the agent unable to interpret the result or know how defaults alter it.

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 coverage is 100%, so each of the 8 parameters is already documented with units and defaults, establishing the baseline of 3. The description adds only that the stats feed a Kelly calculation and that risk management factors exist, without explaining how volatility, stopLossPercent, or takeProfitRatio combine into the final size.

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 verb ('Calculate'), resource ('optimal position size'), and the method ('Kelly Criterion with risk management'), which distinguishes it from the generic analytics_calculate_risk sibling. It stops short of explicitly contrasting itself with that sibling, so it is clear but not fully differentiated.

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 guidance on when to use this versus analytics_calculate_risk, no stated prerequisites (e.g., needing historical trade stats first), and no mention of when not to use it. The agent must infer the use case entirely from the tool name and purpose.

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