Moddable Games Tools

v1.1.0
games.moddable.tools/moddable-games-tools Checked 3 days ago Published 5 months ago

15 tools for chess variant analysis, hex map generation, and board game utilities

B 80/100 Discovery passed License not confirmed DesignSearch

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

chess_generate_puzzle

Get a random chess puzzle. Filter by variant, difficulty or theme. Not every variant puzzle carries themes; use chess_list_puzzle_types to see what the pool holds.

ParameterTypeDescription
difficultystringPuzzle difficulty by rating: easy under 1200, medium 1200-1799, hard 1800 and above
themestringPuzzle theme (fork, pin, skewer, mateIn2, etc). Not every variant puzzle carries themes.
variantstringChess variant play slug (e.g. almost-chess, benedict, fischer-random, king-of-the-hill, standard); a manifest key such as chess960 is also accepted. Returns only puzzles for this variant.

chess_list_puzzle_types

List available puzzle variants, themes, and per-variant counts from the puzzle pool

chess_list_variants

[DEPRECATED — use play_list_variants] List chess variants. Removal: v1.0.0.

ParameterTypeDescription
groupstring

chess_analyze_position

[DEPRECATED — use play_suggest_move] Analyse a chess position. Removal: v1.0.0.

ParameterTypeDescription
depthnumber
variantstring

chess_make_move

[DEPRECATED — use play_apply_move] Apply a move to a chess game. Removal: v1.0.0.

ParameterTypeDescription
move *object
variantstring

chess_validate_move

[DEPRECATED — use play_validate_move] Check if a chess move is legal. Removal: v1.0.0.

ParameterTypeDescription
move *object
variantstring

chess_get_status

[DEPRECATED — use play_check_status] Get chess game status. Removal: v1.0.0.

ParameterTypeDescription
variantstring

chess_render_svg

[DEPRECATED — use play_render_board] Render a chess position as SVG. Removal: v1.0.0.

ParameterTypeDescription
fenstringFEN position string
highlightsarraySquares to highlight (e.g. ["e2","e4"])
variantstring

chess_make_moves

[DEPRECATED — use play_make_moves] Apply a sequence of chess moves. Removal: v1.0.0.

ParameterTypeDescription
moves *array
variantstring

chess_get_opening_book

[REMOVED — engine#98] Opening book resolution is broken in Worker context. No replacement.

ParameterTypeDescription
variantstring

hex_list_games

List all available hex map game types with configuration options

hex_generate_map

Generate a hex map for a specific game and player count

ParameterTypeDescription
game *stringGame type (nukes, colony, catan, age-of-steam, eclipse, twilight-imperium)
playersnumberNumber of players (default: 2)
seedstringRandom seed for reproducibility
sizenumberMap size (default: game default)

hex_export_svg

Generate a hex map and export as SVG

ParameterTypeDescription
game *stringGame type
hexSizenumberHex size in pixels (default: 30)
playersnumberNumber of players
seedstringRandom seed
sizenumberMap size
stylestringVisual style

hex_get_info

Get info about a specific hex coordinate (terrain, neighbours, distance)

ParameterTypeDescription
q *numberHex Q coordinate (column)
r *numberHex R coordinate (row)
gamestringGame context for terrain lookup
seedstringMap seed (to look up terrain from a generated map)

hex_compute_fov

Compute field of view from a hex position

ParameterTypeDescription
q *numberOrigin Q coordinate
r *numberOrigin R coordinate
range *numberVision range in hexes
gamestringGame context for obstacle lookup
seedstringMap seed

hex_pathfind

Find shortest path between two hex coordinates

ParameterTypeDescription
endQ *numberEnd Q
endR *numberEnd R
startQ *numberStart Q
startR *numberStart R
gamestringGame context for movement costs
seedstringMap seed

play_list_families

List all playable game families supported by the engine (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game, backgammon, standard-52, bavarian-32, flower-48, double-six-dominoes, mahjong, standard-dice, agon, asalto, chaupar, dou-shou-qi, fanorona, halma, nyout, pachisi, royal-ur, senet, stern-halma, surakarta, tafl)

play_list_variants

List available variants for a game family. Each variant can be passed to play_create_game. Variants with flags (e.g. +random) can be requested as "slug+flag".

ParameterTypeDescription
family *stringGame family (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game, backgammon, standard-52, bavarian-32, flower-48, double-six-dominoes, mahjong, standard-dice, agon, asa…

play_get_definition

Get the full engine definition (topology, render config, pieces, setup FEN) for a game variant. Returns the resolved frontmatter used to render and play the game.

ParameterTypeDescription
family *stringGame family (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game, backgammon, standard-52, bavarian-32, flower-48, double-six-dominoes, mahjong, standard-dice, agon, asa…
variantstringVariant slug (default: the family's default game)

play_create_game

Create a new game instance for a given family. Returns initial state to pass to subsequent calls. Variant can include flags like "grand+random" or "standard+drops".

ParameterTypeDescription
family *stringGame family name (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game, backgammon, standard-52, bavarian-32, flower-48, double-six-dominoes, mahjong, standard-dice, agon…
rngSeednumberOptional RNG seed for deterministic games
variantstringVariant slug, optionally with flags (e.g. "grand", "grand+random", "standard+drops")

play_get_moves

Get all legal moves for the current position. Requires state from play_create_game or play_apply_move.

ParameterTypeDescription
state *objectGame state object returned by play_create_game or play_apply_move

play_apply_move

Apply a move to the game and return the new state. Pass the move object exactly as returned by play_get_moves (format varies by family: chess uses {from,to}, go uses {coord} or {action:"pass"}).

ParameterTypeDescription
move *objectMove object from play_get_moves (e.g. {from:"e2",to:"e4"} for chess, {coord:40} for go, {action:"pass"})
state *objectGame state object from play_create_game or a previous play_apply_move

play_check_status

Check the current game status: whose turn it is, whether the game is over, and who won.

ParameterTypeDescription
state *objectGame state object from play_create_game or play_apply_move

play_suggest_move

Use AI to analyse the position and suggest the best move. Supports 5 difficulty levels across all 30 playable families.

ParameterTypeDescription
state *objectGame state object from play_create_game or play_apply_move
difficultystringAI difficulty level (default: medium)

play_render_board

Render the current board position as SVG for any playable family (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game, backgammon, standard-52, bavarian-32, flower-48, double-six-dominoes, mahjong, standard-dice, agon, asalto, chaupar, dou-shou-qi, fanorona, halma, nyout, pachisi, royal-ur, senet, stern-halma, surakarta, tafl).

ParameterTypeDescription
state *objectGame state object from play_create_game or play_apply_move
highlightsarrayOptional cells to highlight (e.g. [{key: 52, color: "#ff0"}])
sizeintegerBoard width in pixels for PNG output (default: 480, max: 2048)

play_export_fen

Export the current board position as a FEN-style setup string, in the form the variant's own frontmatter declares its starting position. Card, tile and dice games have no board position to export.

ParameterTypeDescription
state *objectGame state object from play_create_game or play_apply_move

play_load_fen

Create a game from a FEN-style setup string, as returned by play_export_fen. Pass the same variant the position was exported from.

ParameterTypeDescription
family *stringGame family (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game, backgammon, standard-52, bavarian-32, flower-48, double-six-dominoes, mahjong, standard-dice, agon, asa…
fen *stringPosition string in FEN-style notation for the family
variantstringOptional variant slug (default: the family's default game)

play_validate_move

Check whether a move is legal in the current position without applying it. Pass the move object in the same format as play_get_moves returns.

ParameterTypeDescription
move *objectMove object to validate (same format as play_get_moves output)
state *objectGame state object from play_create_game or play_apply_move

play_make_moves

Apply a sequence of moves to a game and return the final state. Stops at the first illegal move. Move objects must match play_get_moves format.

ParameterTypeDescription
moves *arrayArray of move objects in the format returned by play_get_moves
state *objectGame state object from play_create_game or play_apply_move

rules_list_games

List all available game rulebooks with metadata (players, duration, complexity, mechanics). Filterable by type, complexity, and mechanics.

ParameterTypeDescription
categorystringFilter by type (standalone, hub, classic, rpg, component, platform, mod, game)
complexitystringFilter by complexity level
mechanicstringFilter by mechanic (e.g. dice, capture, hex, oracle, narrative)
statusstringFilter by status (default: all)

rules_get_game

Get full rulebook content for a specific game (markdown). For metadata only, use rules_get_game_meta instead.

ParameterTypeDescription
game *stringGame slug (e.g. chess, dnd-5e, catan)

rules_get_game_meta

Get structured metadata for a game: players, duration, complexity, mechanics, how_to_play, variant list, page list, related games. Lightweight alternative to fetching the full rulebook.

ParameterTypeDescription
game *stringGame slug (e.g. chess, backgammon, cairn)

rules_get_page

Get a specific page/section from a game rulebook (e.g. character creation, combat rules, marketplace). Use rules_get_game_meta to see available pages.

ParameterTypeDescription
game *stringGame slug (e.g. cairn, dnd-5e)
page *stringPage slug (e.g. character-creation, combat-and-difficulty)
sectionstringSection name (e.g. rules, classes, spells). Default: rules

rules_get_variant_list

List all variants for a game with structured metadata (players, board, playable status, topology, engine config). Much richer than parsing the rulebook.

ParameterTypeDescription
game *stringGame slug (e.g. chess, backgammon, draughts)
playablebooleanFilter to only engine-playable variants
topologystringFilter by board topology (grid, hex, track, graph, tableau)

rules_get_diagram

Get board diagram SVG URL for a game variant. Returns the diagram path, topology, and rendering metadata.

ParameterTypeDescription
game *stringGame family slug (e.g. chess, go, agon)
variantstringVariant slug (default: standard)

rules_get_variant

Get rules for a specific game variant

ParameterTypeDescription
game *stringGame slug
variant *stringVariant slug

rules_random

Get a random game suggestion from the library

ParameterTypeDescription
maxDurationnumberMaximum game duration in minutes
playersnumberNumber of players available

oracle_list_games

List all supported RPG systems with oracle tables and entity data availability

rpg_chargen

Generate a random character for an RPG system (D&D 5e, Pathfinder, Ironsworn, Cairn, Knave, etc)

ParameterTypeDescription
system *stringRPG system (dnd-5e, pathfinder-1e, ironsworn, starforged, cairn, knave, maze-rats, dungeon-world)
classstringClass preference (omit for random)
levelnumberCharacter level (default: 1)

oracle_roll

Roll on a random oracle table (Ironsworn, Starforged, Maze Rats, etc)

ParameterTypeDescription
system *stringRPG system slug (ironsworn, starforged, maze-rats, cairn, knave, fate-core)
tablestringSpecific table name (omit for random)

oracle_list_tables

List available oracle tables for a system

ParameterTypeDescription
system *stringRPG system slug

oracle_ask

Ask the oracle a yes/no question with likelihood modifier

ParameterTypeDescription
question *stringYes/no question
likelihoodstringHow likely is yes? (default: even)

oracle_scene

Generate a scene using oracle tables. With a recipe, rolls each table in the recipe, resolves cross-references, and composes a narrative sentence. Without, picks random tables.

ParameterTypeDescription
recipestringRecipe ID (from oracle_list_recipes) — rolls each table in the recipe
regionstringRegion for Starforged region-aware recipes
systemstringRPG system slug (default: ironsworn)
typestringScene type for random mode (default: event)

rpg_search_entities

Search RPG entities (spells, monsters, classes, items) across all systems

ParameterTypeDescription
query *stringSearch term
categorystringEntity category (spell, monster, class, item)
gamestringAlias for system
limitnumberMax results (default 10)
systemstringLimit to system (dnd-5e, pathfinder-1e, etc)

rpg_get_entity

Get full details of a specific RPG entity by name

ParameterTypeDescription
name *stringEntity name
categorystringCategory filter (spells, monsters, classes, etc)
gamestringAlias for system
systemstringSystem slug

rpg_random_encounter

Generate a random encounter for a system and difficulty level

ParameterTypeDescription
difficultystringEncounter difficulty
systemstringSystem slug (default: dnd-5e)
typestringMonster type filter (beast, undead, fiend, dragon, etc)

rpg_browse_category

Browse entities by category with pagination

ParameterTypeDescription
category *stringCategory (spell, monster, class, item, feat, etc)
system *stringSystem slug
gamestringAlias for system
pagenumberPage number (default 1)
pageSizenumberItems per page (default 20)

rpg_loot

Generate random loot/treasure for a system and tier

ParameterTypeDescription
countnumberNumber of items (default 3)
systemstringSystem slug (default: dnd-5e)
tierstringLoot tier (default: minor)

oracle_list_recipes

List all predefined scene recipes — curated multi-table compositions that produce coherent narrative prompts

ParameterTypeDescription
gamestringFilter by game system (omit for all)

oracle_interpret

Resolve oracle cross-references. Given a result like "Action + Theme", follows references and returns expanded results

ParameterTypeDescription
result *stringOracle result text to interpret
gamestringGame system (default: starforged)
source_tablestringTable ID the result came from

oracle_table_view

View the complete contents of an oracle table — all entries with roll ranges

ParameterTypeDescription
table *stringTable ID to view
gamestringGame system (default: starforged)

oracle_encounter

Generate a tabletop RPG encounter with CR-appropriate monsters, terrain, and loot (D&D 5e or Pathfinder 1e)

ParameterTypeDescription
difficultystringEncounter difficulty (default: medium)
monster_typestringFilter by type (undead, dragon, beast, etc)
party_levelnumberAverage party level 1-20 (default: 5)
party_sizenumberNumber of players 1-10 (default: 4)
systemstringGame system (default: dnd-5e)
terrainstringTerrain type (omit for random)

rpg_list_categories

List entity categories for an RPG system (spells, monsters, classes, equipment, etc)

ParameterTypeDescription
gamestringGame system slug (omit for all systems)
systemstringAlias for game

rpg_random

Get random entities from an RPG system for inspiration or encounter prep

ParameterTypeDescription
game *stringGame system slug
categorystringCategory to draw from (omit for any)
countnumberNumber of random picks 1-10 (default: 1)
systemstringAlias for game

ti4_random_factions

Generate random faction assignments for Twilight Imperium 4th Edition

ParameterTypeDescription
players *numberNumber of players (3-8)
expansionsarrayExpansion filter (e.g. ["base","pok"]). Default: all

ti4_draft_factions

Milty-style TI4 draft with pick pools per player

ParameterTypeDescription
choicesnumberFactions per player to choose from (default: 3)
expansionsarrayExpansion filter (e.g. ["base","pok"]). Default: all
playersnumberNumber of players (3-8, default: 6)

ti4_list_factions

List all TI4 factions with colors, flags, and expansion info

ParameterTypeDescription
expansionsarrayFilter by expansion (e.g. ["base","pok"]). Default: all

ti4_draw_objectives

Draw random public objectives for TI4

ParameterTypeDescription
countnumberNumber to draw (default: 5)
expansionsarrayExpansion filter
stagenumberStage 1 or 2 (default: both)

ti4_draw_agendas

Draw random agenda cards for TI4 political phase

ParameterTypeDescription
countnumberNumber to draw (default: 2)
expansionsarrayExpansion filter
typestringFilter by type

nukes_setup_generator

Generate random territory/resource setup for a Nukes game

ParameterTypeDescription
playersnumberNumber of players (2-6, default: 2)

game_nukes_combat

Resolve a Nukes combat encounter between units

ParameterTypeDescription
attacker *stringAttacking unit type
defender *stringDefending unit type
terrainstringTerrain type (plains, forest, mountain, urban)

colony_dice_odds

Calculate settlement dice probability for Colony/Catan-style resource numbers

ParameterTypeDescription
numbers *stringSettlement numbers, comma-separated (e.g. "5,6,8,9")

game_deck_create

Create, shuffle, and optionally draw/deal from a card deck

ParameterTypeDescription
drawnumberNumber of cards to draw
handsnumberDeal into N hands
per_handnumberCards per hand (default: 5)
typestringDeck type (default: standard-52)

game_deck_list_types

List all available deck types with metadata

game_deck_deal

Shuffle and deal a custom deck of arbitrary named cards

ParameterTypeDescription
cards *arrayCards in the deck (name + optional quantity)
drawnumberDraw N cards from the top instead of dealing hands
handsnumberDeal into N hands (default: 1 = draw pile only)
per_handnumberCards per hand (default: 5)

game_score_tracker

Track scores for players in any game

ParameterTypeDescription
players *arrayPlayer names
gamestringGame name
scoresarrayScores (default: all 0)

talisman_draw_characters

Draw random characters from the Talisman 4e (revised) base set for a character lottery

ParameterTypeDescription
countnumberNumber of characters to draw (2-6, default: 4)

talisman_draw_encounter

Draw a random encounter for a Talisman ring (outer, middle, inner, crown)

ParameterTypeDescription
ringstringRing to draw from (default: outer)

jam_status

Get the current Mod Jam status (active jam, deadline, submissions)

jam_timer

Get time remaining in the current Mod Jam

jam_vote

Get voting status for the current Mod Jam

dice_roll

Roll dice using standard notation (e.g. 2d6+3, 4d8, d20). Supports comma-separated pools and keep-high/low (4d6kh3).

ParameterTypeDescription
countnumberNumber of times to roll (default 1)
expressionstringAlias for notation
notationstringDice notation (e.g. 2d6+3, 4d6kh3, 3d8,1d12+2)

coin_flip

Flip one or more coins, or pick from a list of choices

ParameterTypeDescription
choicesstringComma-separated options to pick from (overrides coin flip)
countnumberNumber of coins (default 1)

team_split

Randomly divide players into teams

ParameterTypeDescription
players *arrayPlayer names
countnumberNumber of teams (default 2)
membersstringComma-separated names (alternative to array)
teamsnumberAlias for count

random_player_order

Randomise turn order for a list of players

ParameterTypeDescription
players *arrayPlayer names

timer_suggest

Suggest time controls for a game based on player count and complexity

ParameterTypeDescription
game *stringGame name
playersnumberNumber of players

game_jam_theme

Generate a random game jam theme combining mechanics and themes

ParameterTypeDescription
countnumberNumber of themes to generate (default 3)

dice_odds

Calculate probability of meeting a target with a dice expression. Supports keep-high/low (4d6kh3).

ParameterTypeDescription
expression *stringDice expression (e.g. 2d6, 4d6kh3)
target *numberTarget number to meet or exceed
comparisonstringComparison (default >=)