Skip to main content
Glama

ForexDemo.com

Kelly Criterion Calculator

calculate_kelly
Read-onlyIdempotent

The share of an account to risk on each trade that grows it fastest over many trades (the Kelly criterion), half and quarter Kelly, and what a chosen risk gives. Same calculation as the Kelly Criterion Calculator page at https://forexdemo.com/kelly-criterion-calculator.html. Every input is optional unless marked required; left-out inputs use the page's defaults, which are listed in the reply.

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": {
      "winRate": "<winRate>",
      "reward": "<reward>"
    },
    "name": "calculate_kelly"
  }
}

Input Schema

NameRequiredDescriptionDefault
riskNoRisk per trade in percent, to compare with Kelly. Give 2 for 2%.
rewardYesAverage win as a multiple of the average loss, such as 1.5.
sampleNoOptional: how many past trades the win rate comes from, to show how sure it is.
tradesNoNumber of trades to look ahead.
balanceNoOptional account balance, to show amounts.
winRateYesWin rate in percent. Give 2 for 2%.

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, idempotentHint, non-destructive, and closed-world, so safety and repeatability are covered without the description. The description does add useful behavior beyond them: omitted inputs fall back to the referenced page's defaults and those defaults are echoed in the reply. It says nothing about units, precision, or what the response actually contains (e.g., a fraction vs. a currency amount unless balance is supplied).

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 opening sentence is an awkward noun phrase rather than a verb-led statement, making the core action harder to parse on first read. The remaining two sentences about page parity and defaults are efficient and earn their place, but the front-loading could be much stronger.

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?

For a read-only calculator with full schema coverage, no output schema, and annotations carrying the safety profile, the description covers purpose, calculation parity with a reference page, and the default-handling rule. A brief note on what the reply reports (Kelly fraction, half/quarter values, comparison against the chosen risk) would close the remaining gap.

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 each of the six parameters is already documented with defaults and examples. The description adds only a marginal layer — that missing inputs take the referenced page's defaults, which are reported back — without clarifying parameter interactions such as whether balance changes the output from a percentage to an amount. 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?

The description names a specific computation — the Kelly-optimal share of an account to risk, plus half and quarter Kelly and a comparison against a chosen risk — so an agent knows exactly what is calculated. It does not explicitly name a sibling calculator it differs from, leaving the boundary with tools like calculate_position_size or calculate_risk_reward to inference.

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 only implied: the tool is for Kelly-criterion sizing, and the note that 'Every input is optional unless marked required; left-out inputs use the page's defaults' clarifies invocation behavior. There is no explicit when-to-use versus a sibling, and no statement of when this calculator is the wrong choice versus a plain position-size or risk-reward tool.

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