API & MCP
Everything a person can do on Wheel Spinner with Weights, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://fielddaywheelspinner.usefulweb.app/api/v1/calculate– run Wheel Spinner with WeightsGET https://fielddaywheelspinner.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Wheel Spinner with Weights
Spin a decision wheel where each segment can have its own weight (3 × pizza, 1 × sushi). The odds are exactly weight ÷ total, the organiser can publish a SHA-256 fingerprint before the spin, and the result replays identically here.
| Field | Type | Default | Description |
|---|---|---|---|
segments (required) | table | — | Segments |
spins | integer | 1 | Spins |
removeWinners | boolean | true | Remove each winner before the next spin |
secret | text | — | Secret (revealed after the draw). The organiser’s random secret. Its fingerprint is shown before the draw; empty = derived from the entries (predictable, only for demos). |
audienceWord | text | — | Audience word (optional). A word someone calls out after the fingerprint is shown. It changes the draw, so the organiser cannot steer it. |
Example request
Dinner wheel: pizza three times as likely as sushi
curl -X POST https://fielddaywheelspinner.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"segments":[{"label":"Pizza","weight":3},{"label":"Sushi","weight":1},{"label":"Tacos","weight":2},{"label":"Curry","weight":2}],"spins":1,"secret":"c41d0e9b7a2f","audienceWord":"hungry"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://fielddaywheelspinner.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
fieldday_wheel_spinner - Local stdio connector:
node src/mcp-stdio.ts --tool=fieldday-wheel-spinner
{
"mcpServers": {
"fieldday-wheel-spinner": { "type": "http", "url": "https://fielddaywheelspinner.usefulweb.app/mcp" }
}
}