Skip to main content
Glama

Weather Markets Edge 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.half
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. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "applied_fraction_pct": {
      +      "description": "The fraction applied, %."
      +    },
      +    "data_freshness": {},
      +    "example_call": {},
      +    "full_kelly_pct": {
      +      "description": "Full-Kelly fraction of bankroll, %."
      +    },
      +    "needs_input": {},
      +    "rating": {
      +      "description": "Qualitative read of the sizing."
      +    },
      +    "sources": {},
      +    "stake_dollars": {
      +      "description": "Suggested stake in dollars (when a bankroll was given)."
      +    },
      +    "tell_user": {
      +      "description": "Show this sentence to the user first.",
      +      "type": "string"
      +    },
      +    "timestamp": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.3/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 still adds value by disclosing the return shape (dollar stake plus a risk rating) and the conditional behavior that omitting bankroll yields a percentage rather than a dollar figure. It does not discuss edge cases like negative-edge contracts.

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, all load-bearing: purpose, input/output contract, and usage triggers. The most important scoping information is front-loaded and there is no filler.

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 100%-covered schema, an output schema, and annotations covering the read-only profile, the description supplies everything an agent needs: what it computes, what it accepts, what it returns, and when to invoke it. No meaningful gap remains.

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 including accepted formats (percent, cents, dollar, American odds) is already documented. The description restates the parameter list and hints that market price 'sets the payout', but adds little syntax or interpretation beyond the schema. Baseline 3 applies.

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 opens with a precise verb+resource: 'Compute the optimal Kelly position size for a prediction-market contract.' It enumerates the inputs (win probability, market price, bankroll, Kelly fraction) and the outputs (dollar stake, risk rating), making it trivially distinguishable from siblings like calculate_ev or bayes_update.

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 gives concrete user-intent triggers ('how much should I stake', 'what is my position size', 'Kelly sizing for this trade'), which clearly defines when to reach for it. It stops short of naming alternatives or stating when NOT to use it (e.g. for EV calculation use calculate_ev).

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.