@pipeworx/random-tables
Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/random-tables’s. Install: one-click buttons
Connect to just the @pipeworx/random-tables pack
https://gateway.pipeworx.io/random-tables/mcp — only @pipeworx/random-tables’s own tools, nothing else in the catalog.
No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.
Tools: 4
Pipeworx original composable random tables for tabletop and narrative play —
encounters, loot, weather, complications, NPC traits, plot hooks, tavern
scenes, rumours and settlement quirks — with nested {{table:<id>}}
references resolved recursively, plus caller-supplied custom tables. Keyless,
no upstream, no COGS.
Tools
roll_table(table, count?, seed?, session_id?)— roll 1-20 entries from a built-in table. Returns both the raw entry text and the fully resolved text (nested{{table:<id>}}references expanded). Reproducible viaseed.roll_custom_table(entries, count?, seed?)— roll from a table YOU supply ([{text, weight?}]); entries may reference built-in tables the same way.list_random_tables(genre?)— every built-in table’s id, title, genre and entry count, optionally filtered tofantasy|scifi|modern.get_random_table(table)— one built-in table in full, unresolved (raw entry text, so any{{table:<id>}}references are visible as written).
Built-in tables
encounters_fantasy, encounters_scifi, encounters_modern, loot,
weather, complication, npc_personality, npc_secret, npc_occupation,
plot_hook, tavern, rumour, settlement_quirk, npc_full (a composed
sentence that nests npc_personality + npc_occupation + npc_secret in one
roll — the worked example of nested references).
Genre-tagged tables (encounters_*, loot, tavern) are fantasy/scifi/modern
flavored; the rest are genre-agnostic and apply under any list_random_tables
genre filter.
Nested references
An entry’s text may embed {{table:<id>}}, which is resolved by rolling a
weighted entry from that table and substituting it in, recursively, up to 6
levels of nesting. A reference to an unknown table id, or a cycle (a table
that ends up referencing itself through a chain of other references), is a
loud error naming the offending id or the full chain — never a silent
truncation or an empty substitution. roll_custom_table’s caller-supplied
entries may reference built-in tables the same way, but not other entries in
the same custom table (a custom table has no id of its own to reference).
Randomness and reproducibility
Every rolling tool takes an optional seed; the seed actually used is always
returned (in meta.seed), whether you supplied one or not. The same seed and
arguments reproduce the same draw. These are content generators, not
divination — there is no separate “meaning” layer to keep apart from
interpretation; the table text is the result, and how you use it at the
table is up to you.
Sessions
session_id on roll_table draws without replacement across calls —
useful when you don’t want the same loot item or the same rumour to repeat
while a session is live. It is hosted-only, backed by the gateway’s
shared KV (injectCacheKv: true); the npm standalone package has no KV, so a
call that passes session_id there gets back session_supported: false and
a plain seeded roll instead (every tool still works without session_id
regardless of environment).
There is no separate “open session” tool. Pass any string as session_id on
your first call for a table — the response tells you plainly whether it
continued an existing session or had to open a new one, and gives you the
real session_id to reuse on your next call. Omit session_id entirely for
an ordinary independent weighted roll (the common case; no KV needed).
roll_custom_table has no session support — sessions only track built-in
tables, which have a stable id and size to key a session on.
Auth
Keyless.
Data sources
Pipeworx original content. No upstream API, no third-party data. Every table and every entry is written for this pack — none of it is copied, paraphrased or adapted from any commercial tabletop RPG product, sourcebook or supplement.
What else to know
- Zero-row answers are loud errors, not quiet empty lists: an unknown table
id, an unknown genre filter, an unknown or cyclic nested reference, or an
empty/invalid
entriesarray forroll_custom_tableall throw a specific error naming the valid set, rather than returning[]or{}. roll_table’s defaultcountis 1; the cap is 20 for both rolling tools.roll_custom_tableaccepts up to 500 caller-supplied entries.
Tools
- roll_table — Pipeworx original random tables: roll one or more entries from a built-in table — encounters_fantasy, encounters_scifi, encounters_modern, loot, weather, complication, npc_personality, npc_secret, npc
- roll_custom_table — Pipeworx original random tables: roll one or more entries from a table YOU supply — bring your own weighted list of { text, weight? } and get back a reproducible weighted draw.
- list_random_tables — Pipeworx original random tables: list every built-in table id, title, genre and entry count, optionally filtered to one genre (“fantasy”, “scifi” or “modern”).
- get_random_table — Pipeworx original random tables: fetch one built-in table in full — its title, genre, description, and every raw entry (text + weight) — without rolling.
Tools
get_random_table— Pipeworx original random tables: fetch one built-in table in full — its title, genre, description, and every raw entry (text + weight) — without rolling.list_random_tables— Pipeworx original random tables: list every built-in table id, title, genre and entry count, optionally filtered to one genre ( fantasy , scifi or modern ).roll_custom_table— Pipeworx original random tables: roll one or more entries from a table YOU supply — bring your own weighted list of { text, weight? } and get back a reproducible weighted draw.roll_table— Pipeworx original random tables: roll one or more entries from a built-in table — encounters_fantasy, encounters_scifi, encounters_modern, loot, weather, complication, npc_personality, npc_secret, npc