Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Kelly Growth-Security Frontier

workflow.run_kelly_frontier
Read-only

Kelly growth-security frontier (MacLean, Ziemba & Blazenko 1992): for a strategy compounding at a fraction lambda of full Kelly, the probability wealth ever falls to a fraction alpha of its starting value is P = alpha^(2/lambda-1). Provide either lambda_fraction (to compute that probability) or max_probability (to solve for the largest lambda that keeps the ruin probability at or below it). Edge cases: alpha strictly between 0 and 1; give exactly one of lambda_fraction (above 0) or max_probability (strictly between 0 and 1), not both and not neither. Not covered: the edge of a real strategy and its estimation error, transaction costs, discrete bets, and the probability of falling to alpha at a fixed date (the probability is of ever falling to it). Use when user asks "if I bet half-Kelly, what's my chance of ever losing half my bankroll?" or "what fraction of Kelly keeps my chance of a 50% drawdown under 5%?". Valid lambda range is (0, 2]; beyond 2 the probability is certain (1), not the raw formula value. Returns: probability, lambda_fraction (echoed or solved).

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": {
      "alpha": "<alpha>"
    },
    "name": "workflow.run_kelly_frontier"
  }
}

Input Schema

NameRequiredDescriptionDefault
alphaYesFraction of starting capital, 0-1 exclusive (e.g. 0.5 = "ever falls to half my starting bankroll")
lambda_fractionNoFraction of full Kelly being bet (1 = full Kelly, 0.5 = half Kelly). Provide this OR max_probability, not both.
max_probabilityNoTarget ceiling on the ruin probability, 0-1 exclusive. Provide this to solve for the safe lambda_fraction instead of supplying it directly.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare a safe read-only, closed-world computation, so the bar is lower; the description nonetheless adds real behavioral detail beyond them, notably the valid lambda range (0, 2] and the fact that beyond 2 the result saturates at 1 rather than following the raw formula. It also states the return fields. Minor gap: no statement about what happens for out-of-range alpha or both/neither arguments being supplied (error vs. clamp).

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?

It is dense but front-loaded: formula and operation first, then argument rules, then edge cases, then exclusions, then return values. Almost every clause carries information (the formula, the mutual-exclusivity rule, the saturation caveat, the example phrasings). It reads as a long run-on paragraph, which slightly hurts scanability.

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

Completeness5/5

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

For a three-parameter, no-output-schema calculator, the description covers inputs, mutual exclusivity, numeric domains, extrapolation beyond the valid range, return fields, and explicitly out-of-scope variants. An agent could call this correctly without opening the schema.

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 100%, so baseline is 3, but the description earns more by adding constraints the schema omits: the (0, 2] validity window for lambda_fraction and the saturation behavior past 2, plus the 0-1 exclusive bound framing for alpha in terms of 'ever falls to' rather than 'at a fixed date'. That is genuine semantic value beyond the schema text.

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 names a specific analytical object (the Kelly growth-security frontier, with citation) and states both operations precisely: computing P = alpha^(2/lambda-1) from lambda_fraction, or solving for the largest lambda that keeps P at or below max_probability. No sibling tool in the list covers Kelly ruin probability, so the resource is unambiguous and distinguishable at a glance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit argument-selection rules ('give exactly one of lambda_fraction ... or max_probability, not both and not neither'), concrete trigger utterances ('if I bet half-Kelly, what's my chance of ever losing half my bankroll?'), and an explicit scope exclusion list (transaction costs, discrete bets, fixed-date drawdown, estimation error). When-to-use, how-to-choose, and when-not-to-use are all present.

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.