Skip to main content
Glama

NBA 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

NameRequiredDescriptionDefault
bankrollNoTotal bankroll in dollars (e.g. 1000). Optional — omit it and the result is the % of bankroll to stake, without a dollar figure.
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

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. Changed3 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / bankroll / description
      Previous value: -"Total 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\")."New value: +"Total bankroll in dollars (e.g. 1000). Optional — omit it and the result is the % of bankroll to stake, without a dollar figure."
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered; the description adds the meaningful behavior that omitting bankroll switches the output from a dollar stake to a percentage of bankroll. It doesn't state edge-case behavior (e.g. zero or negative Kelly implying no bet), leaving a small gap.

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

Conciseness5/5

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

Three sentences, front-loaded with the verb+resource, then inputs, then return values, then routing phrases. No sentence restates the title or wastes space.

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?

With an output schema present, the description needn't spell out return structure, and it still names the two returned values. Annotations plus 100% schema coverage leave little burden, though a note on zero/negative-edge outcomes would fully close the loop for a numeric advisory tool.

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 the baseline is 3; the schema already documents the flexible price/probability formats, the fraction enum values, and bankroll optionality. The description only reinforces that market price sets the payout and lists the fraction tiers, adding little beyond the structured fields.

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?

States a specific verb and resource — 'Compute the optimal Kelly position size for a prediction-market contract' — and the returned artifacts (dollar stake, risk rating). It is clearly distinguishable from siblings like calculate_ev and convert_probability, which handle EV math and odds conversion rather than sizing.

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?

Three quoted user intents ('how much should I stake', 'what is my position size', 'Kelly sizing for this trade') give concrete routing signals. It stops short of naming when NOT to use it or pointing to calculate_ev as the alternative for edge-only questions, so it is clear context without explicit exclusions.

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.