roll_dice

Pack: dice-roller · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/roll_dice for the schema, then POST the same URL with its arguments for the data.

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.

Parameters

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

Example call

Arguments

{
  "notation": "4d6kh3",
  "times": 6
}

curl

curl -X POST https://gateway.pipeworx.io/dice-roller/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"roll_dice","arguments":{"notation":"4d6kh3","times":6}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('roll_dice', {
  "notation": "4d6kh3",
  "times": 6
});

Response shape

FieldTypeDescription
notationstring
timesnumber
totalnumber
totalsarray
minnumber
maxnumber
meannumber
rollsarray
seedstring
metaobject
termsarray
detailstring
Full JSON Schema
{
  "type": "object",
  "properties": {
    "notation": {
      "type": "string"
    },
    "times": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "totals": {
      "type": "array",
      "items": {
        "type": "number"
      }
    },
    "min": {
      "type": "number"
    },
    "max": {
      "type": "number"
    },
    "mean": {
      "type": "number"
    },
    "rolls": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "notation": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "terms": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "term": {
                  "type": "string"
                },
                "rolls": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                },
                "kept": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                },
                "subtotal": {
                  "type": "number"
                }
              }
            }
          },
          "detail": {
            "type": "string"
          }
        }
      }
    },
    "seed": {
      "type": "string"
    },
    "meta": {
      "type": "object",
      "properties": {
        "seed": {
          "type": "string"
        },
        "procedure": {
          "type": "string"
        },
        "deck": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          }
        },
        "source": {
          "type": "string"
        }
      }
    },
    "terms": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "term": {
            "type": "string"
          },
          "rolls": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "kept": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "subtotal": {
            "type": "number"
          }
        }
      }
    },
    "detail": {
      "type": "string"
    }
  }
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the dice-roller pack
{
  "mcpServers": {
    "dice-roller": {
      "url": "https://gateway.pipeworx.io/dice-roller/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build December 6, 2026