Skip to main content
Glama

Agent Data Tools: Utilities

Roll dice

dice
Read-only

Roll dice in standard notation such as 2d6+3 or 1d20, up to 100 dice of up to 1000 sides, with a cryptographic random source. Returns every roll, the modifier and the total. Use for tabletop games and simulations. Example: roll=2d6+3. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "dice"
  }
}

Input Schema

NameRequiredDescriptionDefault
rollNoDice notation, e.g. 2d6+3 (default 1d6)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses the cryptographic random source, the return payload (every roll, modifier, total), the parameter ceilings, and pricing in both USDC/x402 and card-key forms with the first 10 calls free. It also explains the consequence of non-idempotency that the annotations only hint at — each call is billed, so retries are not free — and the cost model for failed calls.

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 operation and format before cost details, which is the right ordering. There is minor redundancy — the example notation appears twice ("such as 2d6+3" and "Example: roll=2d6+3") and the charging point is restated at the end — but nothing is confusing.

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 no output schema, the description carries the return-shape burden and does so explicitly (all individual rolls, the modifier, the total). Combined with limits, randomness source, and cost model, an agent has everything needed to call this correctly without opening anything else.

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% and the schema already documents the notation format and default, so the baseline is 3. The description earns above that by adding constraints not present in the schema: the 100-dice and 1000-side ceilings and a second worked example, which clarify what the string may legally contain.

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?

Opens with a specific verb and resource ("Roll dice") and pins the exact input format with examples (2d6+3, 1d20). It also states hard bounds (up to 100 dice of up to 1000 sides) and the randomness source, so an agent knows precisely what operation it is invoking and its limits.

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 an explicit intended context ("Use for tabletop games and simulations") plus the practical gate of cost and the free-failure policy, which matters for deciding whether to call repeatedly. It does not name an alternative tool, but for a self-contained dice roller there is no obvious sibling to route against.

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