Skip to main content
Glama

Roll dice

roll_dice
Read-onlyIdempotent

Roll any dice in ordinary notation, thrown on the server with crypto-strength randomness: 2d6+3, d20, d%, 4d6kh3 (keep the highest three), 2d20kl1 (keep the lowest). Up to 200 dice and 12 terms. Nothing is saved and nobody else sees it. Returns: total, the notation as understood, a one-line detail, every die in terms, and crit/fumble for a lone d20.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "notation": "<notation>"
    },
    "name": "roll_dice"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNoWhat the roll is for, echoed back.
notationYesThe dice, like 2d6+3. Encode `+` as %2B in a raw query string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the randomness source, hard limits (200 dice, 12 terms), the privacy/persistence posture ('Nothing is saved and nobody else sees it'), and the exact response fields including crit/fumble semantics. Annotations already cover read-only safety, and the description adds the operational constraints an agent actually needs.

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?

Front-loaded with the action and notation examples, then limits, then privacy, then return shape — a natural decision order with no filler. Every clause carries distinct information.

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?

For a two-parameter tool with no output schema, the description supplies the return shape, the notation grammar, and the failure-relevant limits, leaving nothing material for an agent to guess before calling.

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 the baseline is 3; the description earns above that by documenting notation syntax the schema only gestures at ('like 2d6+3') and by adding constraints absent from the schema, such as the 200-dice and 12-term caps and the kh/kl modifiers. The `label` parameter is left to the schema, which is acceptable given its explicit description there.

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 ('Roll any dice') plus the accepted notation grammar with concrete examples (`2d6+3`, `d%`, `4d6kh3`, `2d20kl1`). This clearly separates it from the sibling dice tools get_dice_style/set_dice_style, which manage styling rather than performing rolls.

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 operating context: rolls happen server-side with crypto-strength randomness, nothing is persisted, and nobody else sees the result — which implicitly distinguishes an ad-hoc roll from session/battle dice activity. It stops short of naming an alternative or stating when-not to use it, so it is clear but not fully routing.

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.