Skip to main content
Glama

Dice Odds

dice_odds
Read-onlyIdempotent

Pipeworx dice engine: the probability distribution of a dice notation (same grammar as roll_dice: 2d6+3, 4d6kh3, 2d20kl1, 4dF, 3d6!), min, max, mean, standard deviation, mode, the probability of every total and, given target, the chance the total is >=, >, <=, < or == that target (e.g. "what are the odds of 15 or more on 3d6"). Exact by enumeration where the outcomes can be enumerated (plain sums, and keep/drop pools up to 1,000,000 outcomes); otherwise a 100,000-sample Monte Carlo estimate labelled method:"monte_carlo" (exploding dice always use it). seed makes a Monte Carlo estimate reproducible.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target": 15,
      "notation": "3d6",
      "comparison": ">="
    },
    "name": "dice_odds"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoOptional seed for the Monte Carlo path; exact results ignore it. Always returned.
targetNoOptional target total to compute a probability for.
notationYesDice notation, e.g. "3d6", "4d6kh3", "2d20kh1+5".
comparisonNoHow the total is compared with target (default ">=").

Output Schema

NameRequiredDescriptionDefault
maxNo
minNo
meanNo
metaNo
modeNo
seedNo
medianNo
methodNo
stddevNo
targetNo
notationNo
comparisonNo
probabilityNo
distributionNo
probability_percentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "comparison": {
      +      "type": "string"
      +    },
      +    "distribution": {
      +      "items": {
      +        "properties": {
      +          "probability": {
      +            "type": "number"
      +          },
      +          "total": {
      +            "type": "number"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "max": {
      +      "type": "number"
      +    },
      +    "mean": {
      +      "type": "number"
      +    },
      +    "median": {
      +      "type": "number"
      +    },
      +    "meta": {
      +      "properties": {
      +        "deck": {
      +          "properties": {
      +            "id": {
      +              "type": "string"
      +            },
      +            "version": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "procedure": {
      +          "type": "string"
      +        },
      +        "seed": {
      +          "type": "string"
      +        },
      +        "source": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "method": {
      +      "type": "string"
      +    },
      +    "min": {
      +      "type": "number"
      +    },
      +    "mode": {
      +      "type": "number"
      +    },
      +    "notation": {
      +      "type": "string"
      +    },
      +    "probability": {
      +      "type": "number"
      +    },
      +    "probability_percent": {
      +      "type": "number"
      +    },
      +    "seed": {
      +      "type": "string"
      +    },
      +    "stddev": {
      +      "type": "number"
      +    },
      +    "target": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses the algorithmic method, the exact enumeration ceiling, the Monte Carlo sample size, that the result is labelled method:"monte_carlo", and that seeding makes estimates reproducible while being ignored on the exact path. That is unusually rich disclosure of accuracy and determinism characteristics.

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 a single dense paragraph that front-loads the purpose and the returned statistics before the accuracy caveats. Nearly every clause carries information, though the run-on structure and parenthetical asides make it slightly harder to scan than a bulleted breakdown would be.

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-value documentation is not required, yet the description summarizes the payload anyway and fully covers the exact-vs-sampled tradeoff, the enumeration limit, and seed behavior. Nothing needed to invoke it correctly — notation format, optional target/comparison, seed scope — 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 coverage is already 100%, so the baseline is 3; the description goes further by clarifying that `seed` only affects the Monte Carlo path and is always returned, and by tying `target` to the >=/>/<=/</== probability output. It adds real conditional semantics rather than restating field types.

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 operation (probability distribution of a dice notation) plus the exact statistics returned — min, max, mean, standard deviation, mode, per-total probabilities — and the conditional target probability. Referencing 'same grammar as roll_dice' immediately separates it from the sibling that actually rolls dice.

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 a concrete use case ("what are the odds of 15 or more on 3d6") and explains which computational path applies when (enumeration up to 1,000,000 outcomes vs a 100,000-sample Monte Carlo, always for exploding dice). It does not explicitly say 'use this rather than roll_dice when you want statistics instead of a single result', though that is strongly implied by the framing.

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.