dice_odds
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/dice_odds for the schema, then POST the same URL with its arguments for the data.
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 every total and, given target, the chance the total is >=, >, <=, < or == that target (e.g. “what are the odds of 15 or more on 3d6”). Exact by enumeration where the outcomes can be enumerated (plain sums, and keep/drop pools up to 1,000,000 outcomes); otherwise a 100,000-sample Monte Carlo estimate labelled method:“monte_carlo” (exploding dice always use it). seed makes a Monte Carlo estimate reproducible.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
notation | string | yes | Dice notation, e.g. “3d6”, “4d6kh3”, “2d20kh1+5”. |
target | number | no | Optional target total to compute a probability for. |
comparison | string | no | How the total is compared with target (default ”>=”). |
seed | string | no | Optional seed for the Monte Carlo path; exact results ignore it. Always returned. |
Example call
Arguments
{
"notation": "3d6",
"target": 15,
"comparison": ">="
}
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":"dice_odds","arguments":{"notation":"3d6","target":15,"comparison":">="}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('dice_odds', {
"notation": "3d6",
"target": 15,
"comparison": ">="
});
Response shape
| Field | Type | Description |
|---|---|---|
notation | string | |
method | string | |
min | number | |
max | number | |
mean | number | |
stddev | number | |
mode | number | |
median | number | |
target | number | |
comparison | string | |
probability | number | |
probability_percent | number | |
distribution | array | |
seed | string | |
meta | object |
Full JSON Schema
{
"type": "object",
"properties": {
"notation": {
"type": "string"
},
"method": {
"type": "string"
},
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"mean": {
"type": "number"
},
"stddev": {
"type": "number"
},
"mode": {
"type": "number"
},
"median": {
"type": "number"
},
"target": {
"type": "number"
},
"comparison": {
"type": "string"
},
"probability": {
"type": "number"
},
"probability_percent": {
"type": "number"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"probability": {
"type": "number"
}
}
}
},
"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"
}
}
}
}
}
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.