Skip to main content
Glama

Overfitting odds

overfitting_odds
Read-onlyIdempotent

Overfitting check: how many attempts plain chance needs to produce the track record you were shown. Give the wins, the losses and how many versions were tried: you get the exact binomial odds of one try reaching it, the odds once somebody shows you the best of N, and how many tries would make it an even bet. Arithmetic only — no market data, no model, no opinion. A 62% win rate over 100 trades is one thing on the first try, nothing on the fiftieth.

Use when you are shown a win rate, a backtest or a signal channel's record and need to know whether luck explains it. Needs no coin. For what a named rule did on real prices use strategy_grid_lookup; to place a return among real accounts, leaderboard_rank_check.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
winsYesWinning trades.
triesNoHow many versions were tried before this one was shown to you. Defaults to 1, which is almost never true.
lossesNoLosing trades. Give this or trades.
tradesYesTotal trades.
baselineNoProbability a single trade wins by chance. Defaults to 0.5.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNofalse when we do not hold that data. Never a zero standing in for an answer.
errorNono_data when ok is false.
reasonNoWhy, in one sentence, and what we do have instead.
readingNoThe same three numbers in one sentence.
try_insteadNoWhen ok is false: the closest call that does answer, ready to send (tool, arguments, and what changed).
odds_one_tryNoP(at least this many wins) for a single attempt. Exact binomial, not simulated.
same_coin_inNoWhen ok is false because this tool lacks the coin: the other tools that hold it, each with arguments ready to send.
win_rate_pctNoThe win rate.
odds_best_of_triesNoSame result, once you take the best of the attempts made.
tries_for_even_oddsNoAttempts needed for chance alone to reach it half the time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "losses": 38,
      +    "tries": 20,
      +    "wins": 62
      +  }
      +]
    • addedOutput schema / properties / same_coin_in
      Added value: +{
      +  "description": "When ok is false because this tool lacks the coin: the other tools that hold it, each with arguments ready to send.",
      +  "type": "array"
      +}
    • addedOutput schema / properties / try_instead
      Added value: +{
      +  "description": "When ok is false: the closest call that does answer, ready to send (tool, arguments, and what changed).",
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / baseline / default
      Added value: +0.5
    • addedInput schema / properties / tries / default
      Added value: +1
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: it is pure arithmetic with no market data, model or opinion, and it specifies the three distinct results returned, which is meaningful for a stats tool.

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?

The purpose and the query pattern are front-loaded before the when-to-use guidance and sibling routing. It is a touch long and the arithmetic sentence packs several clauses, but each sentence carries information and none is 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?

An output schema exists, so return values need no prose explanation, and the description still covers when to reach for it, what it computes, and which siblings handle the adjacent questions. Nothing an agent needs to call it correctly is missing.

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 description coverage is 100%, so the baseline is 3, but the description adds interpretive value by framing wins/losses/tries as 'the track record you were shown and how much searching went into finding it' and illustrating the tries parameter with the 62%-over-100-trades-first-try-vs-fiftieth example.

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 computation (exact binomial odds that a shown track record arose from chance) and names the exact three outputs produced. It clearly distinguishes itself from the strategy/leaderboard siblings by being arithmetic-only rather than data-driven.

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?

Explicit when-to-use ('when you are shown a win rate, a backtest or a signal channel's record and need to know whether luck explains it') plus two named alternatives with their selecting conditions: strategy_grid_lookup for a named rule on real prices, leaderboard_rank_check for placing a return among real accounts.

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