Skip to main content
Glama

Roll Dice

roll_dice
Read-onlyIdempotent

Pipeworx dice engine: roll tabletop dice notation with real randomness — NdS terms joined by + or - (2d6+1d4+3, 1d20-2), keep/drop (4d6kh3, 2d20kl1 for disadvantage, 4d6dl1), exploding dice (3d6!), fudge/Fate dice (4dF) and percentile (d% or d100). Up to 1,000 dice and 10,000 sides. Returns every die rolled, which dice were kept, per-term subtotals, the total and a readable breakdown; times repeats the roll (up to 100) and adds min/max/mean. Omit seed for a fresh roll; pass the returned seed to reproduce it exactly. The outcome is random — the calling agent decides what it means.

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": {
      "times": 6,
      "notation": "4d6kh3"
    },
    "name": "roll_dice"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoOptional seed. Same seed + same arguments = same result. Omit for a fresh random roll; the seed used is always returned.
timesNoHow many times to roll the whole notation (default 1, max 100).
notationYesDice notation, e.g. "2d6+3", "4d6kh3", "2d20kl1", "d%", "4dF", "3d6!".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/destructive=false, and the description adds real value on top: hard limits (1,000 dice, 10,000 sides, times ≤ 100), the nondeterministic-by-default behavior, and how seeding reconciles reproducibility with idempotency. Return contents are described in detail. Strong, though permission/auth context is absent (not relevant for a pure computation, so minor).

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?

Front-loaded with the core action and notation support, then limits, then return shape, then seeding — a logical order with essentially no filler. It is dense to the point of being one long paragraph, which slightly hurts scanability.

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?

No output schema exists, and the description compensates by spelling out exactly what is returned (every die, kept dice, per-term subtotals, total, readable breakdown). Combined with limits and seeding semantics, an agent has everything needed to call and use the result correctly.

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 100%, so baseline is 3, but the description goes beyond it: it explains that `times` adds min/max/mean (not stated in the schema) and that the used seed is always returned, plus a broad set of valid notation examples. It adds genuine meaning rather than restating 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?

States a specific verb+resource ('roll tabletop dice notation') and enumerates the notation grammar it supports (NdS, keep/drop, exploding, Fudge, percentile), which makes it unmistakably distinct from the sibling dice_odds (a probability calculator, not a roller). An agent can tell what this does without opening the schema.

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?

Gives clear operational guidance: omit `seed` for a fresh roll, pass the returned `seed` to reproduce, use `times` for repeated rolls, and explicitly states the agent decides the interpretation of randomness. It doesn't name a when-not condition or explicitly contrast with dice_odds, which keeps it off a 5.

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.