Dice Roller

liveReference

dice-roller — tabletop dice, coin flips and exact dice odds on the Pipeworx chance engine (shared/src/chance.ts; plan: docs/chance-packs-plan.md).

3tools
0msauth
free tier50 calls/day

Tools

roll_dice

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!), fu

No parameters required.

▶Try it
flip_coins

Pipeworx dice engine: flip fair coins with real randomness — up to 1,000 per call. Returns the sequence (H/T), heads and tails counts, and the longest run. Omit `seed` for fresh flips; pass the return

No parameters required.

▶Try it
dice_odds

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 ever

No parameters required.

▶Try it

Test with curl

The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.

List available tools
bash
curl -X POST https://gateway.pipeworx.io/dice-roller/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Call a tool
bash
curl -X POST https://gateway.pipeworx.io/dice-roller/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"roll_dice","arguments":{}}}'

Use with the SDK

Install @pipeworx/sdk to call tools from any TypeScript/Node project.

TypeScript
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("roll_dice", {});
ask_pipeworx
// Or ask in plain English:
const answer = await px.ask("dice-roller — tabletop dice, coin flips and exact dice odds on the pipeworx chance engine (shared/src/chance");