{"openapi":"3.1.0","info":{"title":"Moddable Games Tools","version":"0.1.0","description":"Board game AI tools: 10 playable families, hex maps, puzzles, dice, oracles, RPG entities, rules search"},"servers":[{"url":"https://tools.moddable.games"}],"paths":{"/api/call":{"post":{"summary":"Invoke any tool","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tool"],"properties":{"tool":{"type":"string","description":"Tool name"},"args":{"type":"object","description":"Tool arguments"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools":{"get":{"summary":"List all available tools","responses":{"200":{"description":"Tool listing"}}}},"/api/tools/chess_generate_puzzle":{"post":{"summary":"Get a random chess puzzle. Filter by variant or difficulty. Variant puzzles have no themes and max rating 1400 — theme and hard difficulty filters only apply to standard puzzles.","operationId":"chess_generate_puzzle","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"variant":{"type":"string","description":"Chess variant slug, camelCase or kebab-case (e.g. antichess, almost-chess, atomic, chess960, standard). Returns only puzzles for this variant."},"difficulty":{"type":"string","enum":["easy","medium","hard"],"description":"Puzzle difficulty (variant puzzles max at 1400, so hard returns nothing for variants)"},"theme":{"type":"string","description":"Puzzle theme (fork, pin, skewer, mateIn2, etc). Only standard puzzles carry themes."}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_list_puzzle_types":{"post":{"summary":"List available puzzle variants, themes, and per-variant counts from the puzzle pool","operationId":"chess_list_puzzle_types","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_list_variants":{"post":{"summary":"[DEPRECATED — use play_list_variants] List chess variants. Removal: v1.0.0.","operationId":"chess_list_variants","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_get_legal_moves":{"post":{"summary":"[DEPRECATED — use play_create_game + play_get_moves] Get legal moves for a chess position. Removal: v1.0.0.","operationId":"chess_get_legal_moves","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"variant":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_analyze_position":{"post":{"summary":"[DEPRECATED — use play_suggest_move] Analyse a chess position. Removal: v1.0.0.","operationId":"chess_analyze_position","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"variant":{"type":"string"},"depth":{"type":"number"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_make_move":{"post":{"summary":"[DEPRECATED — use play_apply_move] Apply a move to a chess game. Removal: v1.0.0.","operationId":"chess_make_move","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["move"],"properties":{"move":{"type":"object"},"variant":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_validate_move":{"post":{"summary":"[DEPRECATED — use play_validate_move] Check if a chess move is legal. Removal: v1.0.0.","operationId":"chess_validate_move","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["move"],"properties":{"move":{"type":"object"},"variant":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_get_status":{"post":{"summary":"[DEPRECATED — use play_check_status] Get chess game status. Removal: v1.0.0.","operationId":"chess_get_status","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"variant":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_render_svg":{"post":{"summary":"[DEPRECATED — use play_render_board] Render a chess position as SVG. Removal: v1.0.0.","operationId":"chess_render_svg","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"variant":{"type":"string"},"fen":{"type":"string","description":"FEN position string"},"highlights":{"type":"array","items":{"type":"string"},"description":"Squares to highlight (e.g. [\"e2\",\"e4\"])"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_make_moves":{"post":{"summary":"[DEPRECATED — use play_make_moves] Apply a sequence of chess moves. Removal: v1.0.0.","operationId":"chess_make_moves","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["moves"],"properties":{"moves":{"type":"array","items":{"type":"object"}},"variant":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/chess_get_opening_book":{"post":{"summary":"[REMOVED — engine#98] Opening book resolution is broken in Worker context. No replacement.","operationId":"chess_get_opening_book","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"variant":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/hex_list_games":{"post":{"summary":"List all available hex map game types with configuration options","operationId":"hex_list_games","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/hex_generate_map":{"post":{"summary":"Generate a hex map for a specific game and player count","operationId":"hex_generate_map","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"string","description":"Game type (nukes, colony, catan, age-of-steam, eclipse, twilight-imperium)"},"players":{"type":"number","description":"Number of players (default: 2)"},"size":{"type":"number","description":"Map size (default: game default)"},"seed":{"type":"string","description":"Random seed for reproducibility"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/hex_export_svg":{"post":{"summary":"Generate a hex map and export as SVG","operationId":"hex_export_svg","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"string","description":"Game type"},"players":{"type":"number","description":"Number of players"},"size":{"type":"number","description":"Map size"},"seed":{"type":"string","description":"Random seed"},"style":{"type":"string","description":"Visual style"},"hexSize":{"type":"number","description":"Hex size in pixels (default: 30)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/hex_get_info":{"post":{"summary":"Get info about a specific hex coordinate (terrain, neighbours, distance)","operationId":"hex_get_info","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["q","r"],"properties":{"q":{"type":"number","description":"Hex Q coordinate (column)"},"r":{"type":"number","description":"Hex R coordinate (row)"},"game":{"type":"string","description":"Game context for terrain lookup"},"seed":{"type":"string","description":"Map seed (to look up terrain from a generated map)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/hex_compute_fov":{"post":{"summary":"Compute field of view from a hex position","operationId":"hex_compute_fov","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["q","r","range"],"properties":{"q":{"type":"number","description":"Origin Q coordinate"},"r":{"type":"number","description":"Origin R coordinate"},"range":{"type":"number","description":"Vision range in hexes"},"game":{"type":"string","description":"Game context for obstacle lookup"},"seed":{"type":"string","description":"Map seed"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/hex_pathfind":{"post":{"summary":"Find shortest path between two hex coordinates","operationId":"hex_pathfind","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["startQ","startR","endQ","endR"],"properties":{"startQ":{"type":"number","description":"Start Q"},"startR":{"type":"number","description":"Start R"},"endQ":{"type":"number","description":"End Q"},"endR":{"type":"number","description":"End R"},"game":{"type":"string","description":"Game context for movement costs"},"seed":{"type":"string","description":"Map seed"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_list_families":{"post":{"summary":"List all playable game families supported by the engine (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game)","operationId":"play_list_families","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_list_variants":{"post":{"summary":"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\".","operationId":"play_list_variants","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["family"],"properties":{"family":{"type":"string","description":"Game family (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_get_definition":{"post":{"summary":"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.","operationId":"play_get_definition","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["family"],"properties":{"family":{"type":"string","description":"Game family (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game)"},"variant":{"type":"string","description":"Variant slug (default: standard)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_create_game":{"post":{"summary":"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\".","operationId":"play_create_game","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["family"],"properties":{"family":{"type":"string","description":"Game family name (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game)"},"variant":{"type":"string","description":"Variant slug, optionally with flags (e.g. \"grand\", \"grand+random\", \"standard+drops\")"},"rngSeed":{"type":"number","description":"Optional RNG seed for deterministic games"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_get_moves":{"post":{"summary":"Get all legal moves for the current position. Requires state from play_create_game or play_apply_move.","operationId":"play_get_moves","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["state"],"properties":{"state":{"type":"object","description":"Game state object returned by play_create_game or play_apply_move"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_apply_move":{"post":{"summary":"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\"}).","operationId":"play_apply_move","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["state","move"],"properties":{"state":{"type":"object","description":"Game state object from play_create_game or a previous play_apply_move"},"move":{"type":"object","description":"Move object from play_get_moves (e.g. {from:\"e2\",to:\"e4\"} for chess, {coord:40} for go, {action:\"pass\"})"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_check_status":{"post":{"summary":"Check the current game status: whose turn it is, whether the game is over, and who won.","operationId":"play_check_status","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["state"],"properties":{"state":{"type":"object","description":"Game state object from play_create_game or play_apply_move"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_suggest_move":{"post":{"summary":"Use AI to analyse the position and suggest the best move. Supports 5 difficulty levels across all 10 playable families.","operationId":"play_suggest_move","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["state"],"properties":{"state":{"type":"object","description":"Game state object from play_create_game or play_apply_move"},"difficulty":{"type":"string","enum":["beginner","easy","medium","hard","expert"],"description":"AI difficulty level (default: medium)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_render_board":{"post":{"summary":"Render the current board position as SVG for any playable family (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game).","operationId":"play_render_board","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["state"],"properties":{"state":{"type":"object","description":"Game state object from play_create_game or play_apply_move"},"highlights":{"type":"array","items":{"type":"object","properties":{"key":{"type":"integer"},"color":{"type":"string"}}},"description":"Optional cells to highlight (e.g. [{key: 52, color: \"#ff0\"}])"},"size":{"type":"integer","description":"Board width in pixels for PNG output (default: 480, max: 2048)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_export_fen":{"post":{"summary":"Export the current board position as a FEN-style notation string. Works for all 10 families (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game).","operationId":"play_export_fen","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["state"],"properties":{"state":{"type":"object","description":"Game state object from play_create_game or play_apply_move"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_load_fen":{"post":{"summary":"Create a game state from a FEN-style position string. Works for all 10 families.","operationId":"play_load_fen","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["family","fen"],"properties":{"family":{"type":"string","description":"Game family (chess, draughts, go, reversi, shogi, xiangqi, mancala, morris, hex, landlords-game)"},"fen":{"type":"string","description":"Position string in FEN-style notation for the family"},"variant":{"type":"string","description":"Optional variant slug"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_validate_move":{"post":{"summary":"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.","operationId":"play_validate_move","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["state","move"],"properties":{"state":{"type":"object","description":"Game state object from play_create_game or play_apply_move"},"move":{"type":"object","description":"Move object to validate (same format as play_get_moves output)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/play_make_moves":{"post":{"summary":"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.","operationId":"play_make_moves","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["state","moves"],"properties":{"state":{"type":"object","description":"Game state object from play_create_game or play_apply_move"},"moves":{"type":"array","items":{"type":"object"},"description":"Array of move objects in the format returned by play_get_moves"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rules_list_games":{"post":{"summary":"List all available game rulebooks with metadata (players, duration, complexity, mechanics). Filterable by type, complexity, and mechanics.","operationId":"rules_list_games","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","description":"Filter by type (standalone, hub, classic, rpg, component, platform, mod, game)"},"complexity":{"type":"string","enum":["simple","moderate","complex"],"description":"Filter by complexity level"},"mechanic":{"type":"string","description":"Filter by mechanic (e.g. dice, capture, hex, oracle, narrative)"},"status":{"type":"string","enum":["live","alpha","playtest"],"description":"Filter by status (default: all)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rules_get_game":{"post":{"summary":"Get full rulebook content for a specific game (markdown). For metadata only, use rules_get_game_meta instead.","operationId":"rules_get_game","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"string","description":"Game slug (e.g. chess, dnd-5e, catan)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rules_get_game_meta":{"post":{"summary":"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.","operationId":"rules_get_game_meta","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"string","description":"Game slug (e.g. chess, backgammon, cairn)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rules_get_page":{"post":{"summary":"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.","operationId":"rules_get_page","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game","page"],"properties":{"game":{"type":"string","description":"Game slug (e.g. cairn, dnd-5e)"},"section":{"type":"string","description":"Section name (e.g. rules, classes, spells). Default: rules"},"page":{"type":"string","description":"Page slug (e.g. character-creation, combat-and-difficulty)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rules_get_variant_list":{"post":{"summary":"List all variants for a game with structured metadata (players, board, playable status, topology, engine config). Much richer than parsing the rulebook.","operationId":"rules_get_variant_list","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"string","description":"Game slug (e.g. chess, backgammon, draughts)"},"playable":{"type":"boolean","description":"Filter to only engine-playable variants"},"topology":{"type":"string","description":"Filter by board topology (grid, hex, track, graph, tableau)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rules_get_diagram":{"post":{"summary":"Get board diagram SVG URL for a game variant. Returns the diagram path, topology, and rendering metadata.","operationId":"rules_get_diagram","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"string","description":"Game family slug (e.g. chess, go, agon)"},"variant":{"type":"string","description":"Variant slug (default: standard)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rules_get_variant":{"post":{"summary":"Get rules for a specific game variant","operationId":"rules_get_variant","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game","variant"],"properties":{"game":{"type":"string","description":"Game slug"},"variant":{"type":"string","description":"Variant slug"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rules_search":{"post":{"summary":"Full-text search across all published rulebooks. Returns section-typed results with deep-link anchors.","operationId":"rules_search","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query"},"game":{"type":"string","description":"Limit to specific game slug"},"sectionType":{"type":"string","description":"Filter by section type (general, board, pieces, setup, movement, capture, winning, special, variants)"},"limit":{"type":"number","description":"Max results (default 10)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rules_random":{"post":{"summary":"Get a random game suggestion from the library","operationId":"rules_random","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"players":{"type":"number","description":"Number of players available"},"maxDuration":{"type":"number","description":"Maximum game duration in minutes"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/board_gallery_search":{"post":{"summary":"Search the board gallery (334 rendered board layouts across 33 game families)","operationId":"board_gallery_search","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Search term (e.g. \"8x8\", \"hex\", \"shogi\")"},"limit":{"type":"number","description":"Max results (default 10)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/board_gallery_get":{"post":{"summary":"Get details of a specific board layout by ID","operationId":"board_gallery_get","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["board"],"properties":{"board":{"type":"string","description":"Board ID or name"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/tile_gallery_search":{"post":{"summary":"Search hex tile sets by name, game, or terrain type","operationId":"tile_gallery_search","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Search term (omit to list all)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/tile_gallery_get":{"post":{"summary":"Get details of a specific tile set with all tile types","operationId":"tile_gallery_get","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["set"],"properties":{"set":{"type":"string","description":"Tile set ID or name"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/tile_gallery_stats":{"post":{"summary":"Get statistics about available tile sets","operationId":"tile_gallery_stats","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/board_gallery_stats":{"post":{"summary":"Get statistics about the board gallery (total boards, families, topologies)","operationId":"board_gallery_stats","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/piece_gallery_search":{"post":{"summary":"Search the piece set gallery by name, style, or game type","operationId":"piece_gallery_search","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search term (e.g. \"staunton\", \"pixel\", \"shogi\")"},"family":{"type":"string","description":"Filter by game family (chess, shogi, xiangqi, draughts, go, etc)"},"limit":{"type":"number","description":"Max results (default 10)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/piece_gallery_get_set":{"post":{"summary":"Get full details and piece list for a specific set","operationId":"piece_gallery_get_set","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["set"],"properties":{"set":{"type":"string","description":"Set name or ID"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/piece_gallery_stats":{"post":{"summary":"Get statistics about the piece gallery (total sets, styles, authors, game families)","operationId":"piece_gallery_stats","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/oracle_list_games":{"post":{"summary":"List all supported RPG systems with oracle tables and entity data availability","operationId":"oracle_list_games","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rpg_chargen":{"post":{"summary":"Generate a random character for an RPG system (D&D 5e, Pathfinder, Ironsworn, Cairn, Knave, etc)","operationId":"rpg_chargen","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["system"],"properties":{"system":{"type":"string","description":"RPG system (dnd-5e, pathfinder-1e, ironsworn, starforged, cairn, knave, maze-rats, dungeon-world)"},"level":{"type":"number","description":"Character level (default: 1)"},"class":{"type":"string","description":"Class preference (omit for random)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/oracle_roll":{"post":{"summary":"Roll on a random oracle table (Ironsworn, Starforged, Maze Rats, etc)","operationId":"oracle_roll","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["system"],"properties":{"system":{"type":"string","description":"RPG system slug (ironsworn, starforged, maze-rats, cairn, knave, fate-core)"},"table":{"type":"string","description":"Specific table name (omit for random)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/oracle_list_tables":{"post":{"summary":"List available oracle tables for a system","operationId":"oracle_list_tables","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["system"],"properties":{"system":{"type":"string","description":"RPG system slug"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/oracle_ask":{"post":{"summary":"Ask the oracle a yes/no question with likelihood modifier","operationId":"oracle_ask","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["question"],"properties":{"question":{"type":"string","description":"Yes/no question"},"likelihood":{"type":"string","enum":["certain","likely","even","unlikely","impossible"],"description":"How likely is yes? (default: even)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/oracle_scene":{"post":{"summary":"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.","operationId":"oracle_scene","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"system":{"type":"string","description":"RPG system slug (default: ironsworn)"},"recipe":{"type":"string","description":"Recipe ID (from oracle_list_recipes) — rolls each table in the recipe"},"region":{"type":"string","enum":["terminus","outlands","expanse"],"description":"Region for Starforged region-aware recipes"},"type":{"type":"string","enum":["location","npc","event","combat"],"description":"Scene type for random mode (default: event)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rpg_search_entities":{"post":{"summary":"Search RPG entities (spells, monsters, classes, items) across all systems","operationId":"rpg_search_entities","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search term"},"system":{"type":"string","description":"Limit to system (dnd-5e, pathfinder-1e, etc)"},"game":{"type":"string","description":"Alias for system"},"category":{"type":"string","description":"Entity category (spell, monster, class, item)"},"limit":{"type":"number","description":"Max results (default 10)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rpg_get_entity":{"post":{"summary":"Get full details of a specific RPG entity by name","operationId":"rpg_get_entity","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Entity name"},"system":{"type":"string","description":"System slug"},"game":{"type":"string","description":"Alias for system"},"category":{"type":"string","description":"Category filter (spells, monsters, classes, etc)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rpg_random_encounter":{"post":{"summary":"Generate a random encounter for a system and difficulty level","operationId":"rpg_random_encounter","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"system":{"type":"string","description":"System slug (default: dnd-5e)"},"difficulty":{"type":"string","enum":["easy","medium","hard","deadly"],"description":"Encounter difficulty"},"type":{"type":"string","description":"Monster type filter (beast, undead, fiend, dragon, etc)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rpg_browse_category":{"post":{"summary":"Browse entities by category with pagination","operationId":"rpg_browse_category","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["system","category"],"properties":{"system":{"type":"string","description":"System slug"},"game":{"type":"string","description":"Alias for system"},"category":{"type":"string","description":"Category (spell, monster, class, item, feat, etc)"},"page":{"type":"number","description":"Page number (default 1)"},"pageSize":{"type":"number","description":"Items per page (default 20)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rpg_loot":{"post":{"summary":"Generate random loot/treasure for a system and tier","operationId":"rpg_loot","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"system":{"type":"string","description":"System slug (default: dnd-5e)"},"tier":{"type":"string","enum":["minor","major","legendary"],"description":"Loot tier (default: minor)"},"count":{"type":"number","description":"Number of items (default 3)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/oracle_list_recipes":{"post":{"summary":"List all predefined scene recipes — curated multi-table compositions that produce coherent narrative prompts","operationId":"oracle_list_recipes","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"game":{"type":"string","description":"Filter by game system (omit for all)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/oracle_interpret":{"post":{"summary":"Resolve oracle cross-references. Given a result like \"Action + Theme\", follows references and returns expanded results","operationId":"oracle_interpret","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"string","description":"Oracle result text to interpret"},"source_table":{"type":"string","description":"Table ID the result came from"},"game":{"type":"string","description":"Game system (default: starforged)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/oracle_table_view":{"post":{"summary":"View the complete contents of an oracle table — all entries with roll ranges","operationId":"oracle_table_view","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["table"],"properties":{"table":{"type":"string","description":"Table ID to view"},"game":{"type":"string","description":"Game system (default: starforged)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/oracle_encounter":{"post":{"summary":"Generate a tabletop RPG encounter with CR-appropriate monsters, terrain, and loot (D&D 5e or Pathfinder 1e)","operationId":"oracle_encounter","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"system":{"type":"string","enum":["dnd-5e","pathfinder-1e"],"description":"Game system (default: dnd-5e)"},"party_level":{"type":"number","description":"Average party level 1-20 (default: 5)"},"party_size":{"type":"number","description":"Number of players 1-10 (default: 4)"},"difficulty":{"type":"string","enum":["easy","medium","hard","deadly"],"description":"Encounter difficulty (default: medium)"},"monster_type":{"type":"string","description":"Filter by type (undead, dragon, beast, etc)"},"terrain":{"type":"string","description":"Terrain type (omit for random)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rpg_list_categories":{"post":{"summary":"List entity categories for an RPG system (spells, monsters, classes, equipment, etc)","operationId":"rpg_list_categories","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"game":{"type":"string","description":"Game system slug (omit for all systems)"},"system":{"type":"string","description":"Alias for game"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/rpg_random":{"post":{"summary":"Get random entities from an RPG system for inspiration or encounter prep","operationId":"rpg_random","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"string","description":"Game system slug"},"system":{"type":"string","description":"Alias for game"},"category":{"type":"string","description":"Category to draw from (omit for any)"},"count":{"type":"number","description":"Number of random picks 1-10 (default: 1)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/ti4_random_factions":{"post":{"summary":"Generate random faction assignments for Twilight Imperium 4th Edition","operationId":"ti4_random_factions","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["players"],"properties":{"players":{"type":"number","description":"Number of players (3-8)"},"expansions":{"type":"array","items":{"type":"string"},"description":"Expansion filter (e.g. [\"base\",\"pok\"]). Default: all"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/ti4_draft_factions":{"post":{"summary":"Milty-style TI4 draft with pick pools per player","operationId":"ti4_draft_factions","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"players":{"type":"number","description":"Number of players (3-8, default: 6)"},"choices":{"type":"number","description":"Factions per player to choose from (default: 3)"},"expansions":{"type":"array","items":{"type":"string"},"description":"Expansion filter (e.g. [\"base\",\"pok\"]). Default: all"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/ti4_list_factions":{"post":{"summary":"List all TI4 factions with colors, flags, and expansion info","operationId":"ti4_list_factions","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expansions":{"type":"array","items":{"type":"string"},"description":"Filter by expansion (e.g. [\"base\",\"pok\"]). Default: all"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/ti4_draw_objectives":{"post":{"summary":"Draw random public objectives for TI4","operationId":"ti4_draw_objectives","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stage":{"type":"number","enum":[1,2],"description":"Stage 1 or 2 (default: both)"},"count":{"type":"number","description":"Number to draw (default: 5)"},"expansions":{"type":"array","items":{"type":"string"},"description":"Expansion filter"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/ti4_draw_agendas":{"post":{"summary":"Draw random agenda cards for TI4 political phase","operationId":"ti4_draw_agendas","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","description":"Number to draw (default: 2)"},"type":{"type":"string","enum":["law","directive"],"description":"Filter by type"},"expansions":{"type":"array","items":{"type":"string"},"description":"Expansion filter"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/nukes_setup_generator":{"post":{"summary":"Generate random territory/resource setup for a Nukes game","operationId":"nukes_setup_generator","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"players":{"type":"number","description":"Number of players (2-6, default: 2)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/game_nukes_combat":{"post":{"summary":"Resolve a Nukes combat encounter between units","operationId":"game_nukes_combat","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["attacker","defender"],"properties":{"attacker":{"type":"string","description":"Attacking unit type"},"defender":{"type":"string","description":"Defending unit type"},"terrain":{"type":"string","description":"Terrain type (plains, forest, mountain, urban)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/colony_dice_odds":{"post":{"summary":"Calculate settlement dice probability for Colony/Catan-style resource numbers","operationId":"colony_dice_odds","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["numbers"],"properties":{"numbers":{"type":"string","description":"Settlement numbers, comma-separated (e.g. \"5,6,8,9\")"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/game_deck_create":{"post":{"summary":"Create, shuffle, and optionally draw/deal from a card deck","operationId":"game_deck_create","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["standard-52","bavarian-32","hanafuda-48","mahjong-136","dominoes-28","standard-dice"],"description":"Deck type (default: standard-52)"},"draw":{"type":"number","description":"Number of cards to draw"},"hands":{"type":"number","description":"Deal into N hands"},"per_hand":{"type":"number","description":"Cards per hand (default: 5)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/game_deck_list_types":{"post":{"summary":"List all available deck types with metadata","operationId":"game_deck_list_types","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/game_deck_deal":{"post":{"summary":"Shuffle and deal a custom deck of arbitrary named cards","operationId":"game_deck_deal","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["cards"],"properties":{"cards":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"number","default":1}},"required":["name"]},"description":"Cards in the deck (name + optional quantity)"},"hands":{"type":"number","description":"Deal into N hands (default: 1 = draw pile only)"},"per_hand":{"type":"number","description":"Cards per hand (default: 5)"},"draw":{"type":"number","description":"Draw N cards from the top instead of dealing hands"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/game_score_tracker":{"post":{"summary":"Track scores for players in any game","operationId":"game_score_tracker","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["players"],"properties":{"players":{"type":"array","items":{"type":"string"},"description":"Player names"},"scores":{"type":"array","items":{"type":"number"},"description":"Scores (default: all 0)"},"game":{"type":"string","description":"Game name"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/talisman_draw_characters":{"post":{"summary":"Draw random characters from the Talisman 4e (revised) base set for a character lottery","operationId":"talisman_draw_characters","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","description":"Number of characters to draw (2-6, default: 4)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/talisman_draw_encounter":{"post":{"summary":"Draw a random encounter for a Talisman ring (outer, middle, inner, crown)","operationId":"talisman_draw_encounter","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ring":{"type":"string","enum":["outer","middle","inner","crown"],"description":"Ring to draw from (default: outer)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/jam_status":{"post":{"summary":"Get the current Mod Jam status (active jam, deadline, submissions)","operationId":"jam_status","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/jam_timer":{"post":{"summary":"Get time remaining in the current Mod Jam","operationId":"jam_timer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/jam_vote":{"post":{"summary":"Get voting status for the current Mod Jam","operationId":"jam_vote","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/dice_roll":{"post":{"summary":"Roll dice using standard notation (e.g. 2d6+3, 4d8, d20). Supports comma-separated pools and keep-high/low (4d6kh3).","operationId":"dice_roll","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notation":{"type":"string","description":"Dice notation (e.g. 2d6+3, 4d6kh3, 3d8,1d12+2)"},"expression":{"type":"string","description":"Alias for notation"},"count":{"type":"number","description":"Number of times to roll (default 1)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/coin_flip":{"post":{"summary":"Flip one or more coins, or pick from a list of choices","operationId":"coin_flip","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","description":"Number of coins (default 1)"},"choices":{"type":"string","description":"Comma-separated options to pick from (overrides coin flip)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/team_split":{"post":{"summary":"Randomly divide players into teams","operationId":"team_split","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["players"],"properties":{"players":{"type":"array","items":{"type":"string"},"description":"Player names"},"members":{"type":"string","description":"Comma-separated names (alternative to array)"},"count":{"type":"number","description":"Number of teams (default 2)"},"teams":{"type":"number","description":"Alias for count"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/random_player_order":{"post":{"summary":"Randomise turn order for a list of players","operationId":"random_player_order","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["players"],"properties":{"players":{"type":"array","items":{"type":"string"},"description":"Player names"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/timer_suggest":{"post":{"summary":"Suggest time controls for a game based on player count and complexity","operationId":"timer_suggest","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"string","description":"Game name"},"players":{"type":"number","description":"Number of players"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/game_jam_theme":{"post":{"summary":"Generate a random game jam theme combining mechanics and themes","operationId":"game_jam_theme","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","description":"Number of themes to generate (default 3)"}}}}}},"responses":{"200":{"description":"Tool result"}}}},"/api/tools/dice_odds":{"post":{"summary":"Calculate probability of meeting a target with a dice expression. Supports keep-high/low (4d6kh3).","operationId":"dice_odds","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["expression","target"],"properties":{"expression":{"type":"string","description":"Dice expression (e.g. 2d6, 4d6kh3)"},"target":{"type":"number","description":"Target number to meet or exceed"},"comparison":{"type":"string","enum":[">=",">","<=","<","="],"description":"Comparison (default >=)"}}}}}},"responses":{"200":{"description":"Tool result"}}}}}}