Skip to main content
Glama

Crypto Markets Desk

Kelly Position Size

kelly_size
Read-only

Compute the optimal Kelly position size for a prediction-market contract. Given your win probability, the market price (which sets the payout), your bankroll, and a Kelly fraction (full / half / quarter / eighth), returns the dollar stake and a risk rating. Use for "how much should I stake", "what is my position size", "Kelly sizing for this trade".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bankrollNoTotal bankroll in dollars (e.g. 1000). Optional — omit it and the result is the % of bankroll to stake, without a dollar figure. Accepts a number or a numeric string ("1000", "$1,000").
fractionNoKelly fraction to apply. Half-Kelly is the common sharp-money default. One of: full · half · quarter · eighth.
marketPriceYesContract price in cents (1–99). Sets the payout ratio. Accepts 55, "55%", "55¢", "$0.55", 0.55 or American odds (+120 / -150) — all read as 55%.
winProbabilityYesYour probability the contract resolves YES, in % (0–100). Accepts 55, "55%", "55¢", "$0.55", 0.55 or American odds (+120 / -150) — all read as 55%.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
ratingNoQualitative read of the sizing.
sourcesNo
tell_userNoShow this sentence to the user first.
timestampNo
needs_inputNo
example_callNo
stake_dollarsNoSuggested stake in dollars (when a bankroll was given).
data_freshnessNo
full_kelly_pctNoFull-Kelly fraction of bankroll, %.
applied_fraction_pctNoThe fraction applied, %.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare this is a non-destructive, closed-world read (readOnlyHint=true, destructiveHint=false, openWorldHint=false). The description adds that the result includes a dollar stake and a risk rating, but its other behavioral details (omitting bankroll yields a % instead of dollars) duplicate the schema, and an output schema already exists to describe returns.

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 front-loaded with the core action and the inputs, then closes with example user phrasings. Two tight sentences with no filler, though the quoted trigger list is somewhat verbose given the surrounding clarity.

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?

With a full input schema, an output schema, and annotations covering the safety profile, the description needs only to state the computation and its inputs, which it does. Nothing an agent needs to call the tool correctly is missing.

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 every parameter is already fully documented, including accepted formats and the half-Kelly default. The description restates the four inputs generically and adds no syntax or format detail beyond the schema.

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 gives a specific verb and resource ('Compute the optimal Kelly position size for a prediction-market contract') and names the exact inputs that drive it. It clearly separates this calculation from siblings like calculate_ev or bayes_update, which perform different math.

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?

It supplies concrete trigger phrasing ('how much should I stake', 'what is my position size', 'Kelly sizing for this trade'), giving the agent clear context for when to select it. However, it never states when NOT to use it or names an alternative tool for adjacent sizing/EV questions.

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.