MysteryForgeby Insurrection Studios

MysteryForge MCP tools

Every tool the MysteryForge MCP server (engine 0.101.0) offers, with its arguments — generated from the server's own tools/list when this site was built, so it is never out of step with the server. Start with the agent quickstart. Conventions: a thing is <kind>_id, a document is the kind's name, a game folder is project_path, a file written is output_path; an argument a tool does not take is an error that lists what it does take.

137 tools:

get_project_info · update_project_info · get_spec · open_project · doctor · list_scenes · get_scene · create_scene · update_scene · delete_scene · list_templates · upsert_template · delete_template · template_from_scene · create_scenes_from_template · duplicate_scene · bulk_update_scenes · add_hotspot · update_hotspot · remove_hotspot · list_items · upsert_item · delete_item · list_hints · upsert_hint · delete_hint · find_softlocks · analyze_game · write_walkthrough · list_walkthroughs · get_walkthrough · delete_walkthrough · play_typed · list_containers · lint_ui · release_check · export_handoff · scene_diff · playtest_report · autoplay_game · run_walkthroughs · rename_id · upgrade_engine · list_scripts · write_script · delete_script · list_topics · upsert_topic · delete_topic · list_regions · upsert_region · delete_region · list_links · upsert_link · delete_link · list_clues · upsert_clue · delete_clue · list_deductions · upsert_deduction · delete_deduction · list_contacts · upsert_contact · delete_contact · list_characters · upsert_character · delete_character · list_variables · set_variable · delete_variable · list_dialogues · get_dialogue · upsert_dialogue · delete_dialogue · list_puzzles · get_puzzle · upsert_puzzle · list_puzzle_types · check_budgets · check_puzzles · delete_puzzle · list_assets · check_assets · set_asset_status · convert_audio · convert_video · replace_asset · art_status · art_set_bible · art_plan · art_upsert_shot · art_delete_shot · art_estimate · art_calibrate · art_generate · art_job · art_accept · write_asset_text · generate_voice · list_voice_lines · get_score · upsert_score_entry · delete_score_entry · export_script · list_review_comments · add_review_comment · set_review_comment_status · list_achievements · upsert_achievement · delete_achievement · list_endings · upsert_ending · delete_ending · get_mystery · set_mystery · delete_mystery · check_mystery · production_report · check_loudness · normalize_loudness · export_vo_script · import_vo_takes · vo_status · generate_missing_voices · estimate_voices · record_voices · import_assets · validate_project · run_engine_tests · run_preview · stop_preview · screenshot_scene · export_game · blueprint_template · validate_blueprint · scaffold_from_blueprint · create_game

get_project_info#

Get project info

Returns game/project.json plus content counts and the project path. Start here to orient yourself in a MysteryForge project.

No arguments.

update_project_info#

Update project info

Shallow-merges fields into game/project.json. Allowed: title, former_titles, version, author, subtitle, splash, start_scene, start_actions, resolution, ui, map, difficulty, time, credits, audio (a null value removes a field). Renaming a game whose players already have saves? Put the old title in former_titles (newest first): a player's computer keeps saves in a folder named after the title, and the game copies them across on its first start under the new one (get_spec 'Renaming a game'). subtitle is the line under the title on the title screen (else the author); splash is the startup cards shown once before the title — [{image, seconds? (0.5-15, default 3), text? (what a screen reader says)}], any click or key skips one (get_spec 'Title screen & startup cards'). audio merges key by key — {duck_db?, crossfade?, mixes?, cues?}; cues gives the engine's interface cues (pickup, clue, journal, objective, objective_done, click, error, success, achievement, ring, text, chapter) files of the game's own and merges cue by cue (get_spec 'Music & sound'). The id is immutable. ui is {accent_color?, show_hotspot_labels?, dialogue_portraits?, skin?, verbs?, viewport?} and merges key by key (null removes one; verbs and viewport are replaced whole); ui.skin is one look for the menus, panels and every puzzle — {highlight, text, text_dim, panel, panel_border, ink, edge, good, bad (hex colours), radius (0-40), font, title_font (headings), frame (project-relative files), frame_margin, notebook (paper for the journal and task list), notebook_margin, notebook_ink, tray (the inventory strip picture), tray_margin, icons (hint|phone|inbox|suspects|case|accuse|journal|tasks|map|menu → a picture beside that HUD button)}; see get_spec 'Skin'. ui.verbs turns on the pick-a-verb-then-the-thing interface — {list:[{id, name, cursor?, refusal?}], sticky?, rect?:[x,y,w,h]}; a hotspot then carries verbs: {<verb id>: [steps]} (get_spec 'Verbs'). ui.viewport frames rooms in a window — {rect?, frame?, frame_margin?, background?, default?:'full'|'framed'} and a scene says viewport: 'framed'|'full' (get_spec 'Framed viewport'). time is the game's clock — {phases:['Morning','Evening'], days?, start?:{day,phase}, show?, on_end?:[steps]}; see get_spec 'Time & schedules'. difficulty is {levels:[{id, name, description?, hints? (false turns the Hint button off)}], default?} — two or more levels make New Game ask the player, and the choice is the built-in variable difficulty for conditions.

Argument Type Required Description
patch object yes

get_spec#

Get format spec

The studio's reference documents. With no arguments it returns an OUTLINE (every heading, ## sections and ### subsections, with its size) — read the outline first, then ask for the part you need with section (a heading, or the start of one, case-insensitive: 'Actions', 'Verbs', 'Containers', 'Puzzle types'…), which returns that heading and everything under it. document picks the reference: 'spec' (default: the Game Definition Format — scenes, hotspots, actions, conditions, dialogues, puzzles, and every feature of the engine), 'blueprint' (the guide to writing a whole mystery as one document for scaffold_from_blueprint), or 'mcp' (these tools, with the intended workflow). all: true returns the whole document (large: the spec is over 200 KB).

Argument Type Required Description
section string
document "spec" \ "blueprint" \ "mcp"
all boolean

open_project#

Open a game project

Points every tool at another MysteryForge game folder (one with project.godot and game/project.json) without restarting the server — use it after create_game / scaffold_from_blueprint made a game elsewhere (they open it for you by default), or to switch between games. A running preview of the previous game is stopped. Returns the new project's title and path.

Argument Type Required Description
project_path string yes

doctor#

Environment check

Reports the Godot binary, its version, the project path and status, preview state, and voice-generation availability. Run this first when anything seems broken.

No arguments.

list_scenes#

List scenes

Lists all scenes with name, background, and hotspot count.

No arguments.

get_scene#

Get scene

Returns the full JSON document of one scene.

Argument Type Required Description
scene_id string yes

create_scene#

Create scene

Creates a new scene from a full scene document (see get_spec section 'Scenes'). Required: id (snake_case), name, background (path under game/assets/) — or a panorama block ({image, h_span?, v_span?, yaw?, pitch?, fov?}) for a 360° look-around room whose hotspots, overlays and actors use coordinates on the flat panorama image. Optional stage for people: markers, floor, actors (see get_spec 'Actors'). The image file may be added afterwards — missing assets are warnings until validate_project.

Argument Type Required Description
scene object yes

update_scene#

Update scene (replace)

Replaces a scene's entire JSON document. For surgical edits prefer add_hotspot / update_hotspot / remove_hotspot. The id cannot change.

Argument Type Required Description
scene_id string yes
scene object yes

delete_scene#

Delete scene

Deletes a scene. Refuses if other content references it, unless force=true.

Argument Type Required Description
scene_id string yes
force boolean

list_templates#

List room templates

Lists the game's room templates (game/templates/.json): a scene document with {{parameter}} placeholders, for games with many alike rooms (a hotel's floors, a street of shopfronts). Each entry: id, name, the parameters with their defaults (null = no default, a value must be given), and how many hotspots the room has. Templates are authoring-only — they are turned into ordinary scenes by create_scenes_from_template and are never part of a build.

No arguments.

upsert_template#

Create or replace a room template

Writes game/templates/.json. scene is a full scene document in which any string may hold {{name}} placeholders (snake_case) — in its id, name, background, hotspot labels, goto targets, texts, anywhere; a string that is only a placeholder takes the parameter's own type (a number, a list). params gives each parameter's default (null = none: every room made from the template must supply it). A placeholder the scene uses but params does not list is added as a required parameter. Use template_from_scene to make one from a room that already works.

Argument Type Required Description
id string yes
name string
params object
scene object yes

delete_template#

Delete a room template

Deletes game/templates/.json. Rooms already made from it are ordinary scenes and are not touched.

Argument Type Required Description
template_id string yes

template_from_scene#

Make a room template from a scene

Turns an existing scene into a template: params maps each parameter name to the text it stands for in that scene ({"number": "101", "name": "Room 101"}); every occurrence of that text in any string of the scene becomes {{number}} / {{name}}, the longest text first (so "Room 101" is one parameter, not "Room {{number}}"), and the texts become the defaults. The scene is not changed.

Argument Type Required Description
scene_id string yes
template_id string yes
params object yes
name string

create_scenes_from_template#

Make rooms from a template

Creates ordinary scenes from a template, one per entry of rooms: [{id?, params?}]. A room's parameters are the template's defaults with its own on top; {{placeholders}} are filled everywhere in the scene (a string that is only a placeholder takes the value's own type). The new scene's id is the room's id, else the template scene's own id once filled (e.g. hotel_{{number}} → hotel_204). Refuses a scene that already exists unless overwrite, and a room with a parameter that has no value (naming it). With dry_run nothing is written and the scenes are returned. Returns the ids created and the usual reference warnings (a door to a room that does not exist yet is expected while you are still making the set).

Argument Type Required Description
template_id string yes
rooms object[] yes
overwrite boolean
dry_run boolean

duplicate_scene#

Duplicate a scene

Copies scene from to a new scene to (hotspots, views, overlays, everything). replace ({"Old": "New"}) swaps text in every string of the copy except its id — a label, a door's target, a narration — longest first. name sets the new scene's display name. Refuses if to exists. Door links (links.json) belong to rooms by id and are not copied.

Argument Type Required Description
from string yes
to string yes
name string
replace object

bulk_update_scenes#

Edit many scenes at once

Applies the same edit to every scene that matches select — at least one of: ids (a list), group, region, match (a glob over scene ids: hotel_*, floor_?_lobby), has_hotspot (a hotspot id); all that are given must hold. The edit: set ({field: value}; null removes the field; a scene's id cannot change) on the scene itself, hotspots ([{id, set?: {field: value|null}, remove?: true}]) on the hotspots with those ids wherever a scene has them, add_hotspots (full hotspot documents, added to each scene that has none with that id), and replace ({"Old": "New"}: text in every string of the scene except its id). Nothing is written unless apply is true: without it you get the plan — per scene, what would change — so check it first. Scenes where nothing would change are counted, not listed.

Argument Type Required Description
select object yes
set object
hotspots object[]
add_hotspots object[]
replace object
apply boolean

add_hotspot#

Add hotspot

Appends a hotspot to a scene. Hotspot needs: id, shape ({type:'rect',rect:[x,y,w,h]} normalized 0..1), actions; optional: label, cursor (examine|take|talk|action|move_left|move_right|move_up|move_back), visible_if, use_items, verbs ({: [steps]} — needs ui.verbs in project.json), wrong_item_text.

Argument Type Required Description
scene_id string yes
hotspot object yes

update_hotspot#

Update hotspot (merge)

Shallow-merges fields into one hotspot of a scene. To clear a field, set it to null. The hotspot id cannot change.

Argument Type Required Description
scene_id string yes
hotspot_id string yes
patch object yes

remove_hotspot#

Remove hotspot

Removes one hotspot from a scene.

Argument Type Required Description
scene_id string yes
hotspot_id string yes

list_items#

List items

Lists all inventory items.

No arguments.

upsert_item#

Create or update item

Creates or replaces an inventory item: {id, name, icon, description?, voice?, combine?}. icon is a path under game/assets/items/. combine is an optional array of recipes [{with: , result?: , consume? (default true), text?, voice?, if?, actions?}] — holding this item and clicking with in the inventory makes result; recipes work in both directions (see docs/SPEC.md 'Combining items').

Argument Type Required Description
item object yes

delete_item#

Delete item

Deletes an item. Refuses if referenced, unless force=true.

Argument Type Required Description
item_id string yes
force boolean

list_hints#

List hints

Lists the Hint-button entries from game/hints.json, in order. Entries are tried top to bottom and the first whose if conditions hold is shown to the player.

No arguments.

upsert_hint#

Create or update a hint

Creates or replaces a hint entry in game/hints.json: {id, levels:[{text, voice?}] (gentlest first), from? (character id shown with the hint), if? (conditions for when it applies)}. Entries are tried in file order and the FIRST whose if holds is shown, so put specific situations first and a catch-all (no if) last. A new hint is appended unless position (0-based) is given; an existing id is replaced in place unless position moves it. The built-in variables difficulty and hints_used may be used in if. See docs/SPEC.md 'Hints'.

Argument Type Required Description
hint object yes
position integer

delete_hint#

Delete a hint

Removes a hint entry from game/hints.json.

Argument Type Required Description
hint_id string yes

find_softlocks#

Soft-lock search (exact)

Walks EVERY sequence of player moves (clicks, item uses, combines, dialogue answers, puzzle outcomes, dice rolls, timers) through the game's real rules and reports POINTS OF NO RETURN — moves after which the game is still running but can no longer be won (throwing away the only key, burning a one-time dialogue choice, a one-way door into a dead end) — each with the shortest route to it, plus dead ends. Unlike analyze_game (optimistic reachability) this is order-sensitive. It only claims a soft-lock when the whole state space was explored; if it hits max_states/max_seconds it says so and reports none. Slower than analyze_game (seconds to a minute on large games). Treats custom scripts as opaque.

Argument Type Required Description
max_states integer
max_seconds integer
exhaustive boolean true = also explore every order of harmless moves (slower; same verdict). Default: take provably harmless pickups/answers early so big games finish.

analyze_game#

Story check: can the game be finished?

Plays the game optimistically (every puzzle solved, every dialogue branch taken, best possible order) and reports what STILL can't happen: scenes nobody can reach, hotspots/choices whose conditions can never be true, flags that are checked but never set, items that can't be obtained, puzzles/dialogues nothing starts, and whether any winning end_game is reachable. Complements validate_project (which checks references, not story logic). It does not find soft-locks that need an exact order of play, and treats custom scripts as opaque. Run it after building or changing a game's logic.

No arguments.

write_walkthrough#

Write a walkthrough (regression playthrough)

Saves game/walkthroughs/.json: a scripted playthrough that run_walkthroughs replays headless through the real game UI, so a later edit that breaks the route fails loudly. Format: {name?, difficulty?, steps:[...]} where each step is one of {click: hotspot_id}, {use: item_id, on: hotspot_id}, {choose: 'text of a dialogue option' | 1-based number}, {solve: puzzle_id} (cheat-solves the open puzzle), {abandon: true}, {combine: [item_a, item_b]}, {call: contact_id} (ring a phone contact), {answer: contact_id} / {decline: contact_id} (a ringing phone), {reply: text_id} (answer a text), {accuse: suspect_id, evidence: {means|motive|opportunity: clue_id}} (the finale of a mystery), {deduce: deduction_id} (the case board: select its clues and Connect), expect may also say {ending: ending_id}, {read: email_id} (open an inbox message), {goto: scene_id} (teleport), {wait: seconds}, {expect: {scene, has_item, missing_item, solved, visible: [hotspot ids], hidden: [hotspot ids], conditions: [...condition list], game_over: 'win'|'lose', said: 'text shown by the last step'}}. Narration and dialogue lines advance automatically; only choices need a step. See docs/SPEC.md 'Walkthroughs'.

Argument Type Required Description
walkthrough_id string yes
walkthrough object yes

list_walkthroughs#

List the walkthroughs

Lists game/walkthroughs/*.json: each one's name, difficulty, number of steps and what it ends on. (A typed route, text_route.txt, is listed too.)

No arguments.

get_walkthrough#

Read a walkthrough

Returns one walkthrough's document (its steps), e.g. the route autoplay_game saved.

Argument Type Required Description
walkthrough_id string yes

delete_walkthrough#

Delete a walkthrough

Deletes game/walkthroughs/.json (for a probe or an out-of-date route). Nothing else refers to a walkthrough.

Argument Type Required Description
walkthrough_id string yes

play_typed#

Play the game by typing commands

Plays the game through the text front end — the way a person at a terminal (or a language model) plays it, and exactly what the release gate's typed-play replay does. Give a list of commands, one per entry (look, click <thing>, open drawer — a game's own verbs are commands —, use <item> on <thing>, choose <words>, inventory, clues, accuse …, help lists them all); the game starts fresh, runs them in order, and every reply comes back so you can SEE what a player sees: what the room lists, what a verb answers, what a conversation offers. A command that cannot be done says why instead of silently doing nothing. Use it to check that a route is playable (and readable) without a screenshot, and to find what the gate's typed replay is choking on. Puzzles are entered with puzzle, press <n>, type <n> <text>; debug solve solves the open one. Returns the opening and one {command, reply, scene} per command.

Argument Type Required Description
commands string[] yes
difficulty string

list_containers#

List the containers

Lists every scene's containers (drawers, trunks…): id, room, name, what is inside at the start, what else it accepts — and the ids of the hotspots the engine writes for each one (ct_<container>_take_<item>, ct_<container>_put_<item>, ct_<container>_close), which a walkthrough clicks. See get_spec 'Containers'. Containers are edited with update_scene (the scene's containers list); open_container / close_container are steps and contains is a condition.

No arguments.

lint_ui#

Lint the UI for layout and translation problems

Plays through the real UI pseudo-localised (every translatable text comes back accented and 40% longer) at a larger text size (default 150%), visiting every room, panel, dialogue line, puzzle (and every built-in puzzle type) and close-up, and reports: text that runs off the screen, text cut off by a fixed box, and visible text that never goes through MF.t() so a translator cannot reach it. Findings are [] when the UI holds up. Takes a minute or two on a big game.

Argument Type Required Description
text_scale number

release_check#

Is this game fit to ship?

The release gate at one of three strictness levels. alpha: the data is sound (validates, no missing picture, the editor and dev tools stay out of the builds). beta: a finished-looking game (at most half the pictures placeholder, at most half the voice lines missing, none edited since recorded, every shipped language — every locale file — at least 80% translated, author and credits, no validation warning). gold: nothing placeholder, missing or stale, every shipped language fully translated, no open review comment. Returns every gate with pass / fail / warn / skip, what it found and how to fix it. full: true also runs the proof suite (story check, the exact soft-lock search with every ending reached, puzzle proofs, memory budget, the walkthroughs, a bot that wins, the UI lint) — minutes; without it only the data gates run. Never calls a provider, never needs a key.

Argument Type Required Description
level "alpha" \ "beta" \ "gold"
full boolean

export_handoff#

Hand the rooms to an outside artist

Writes the render hand-off pack for an artist who will paint or render the rooms without opening the game: for every room a layout guide (an SVG at the size to deliver, every hotspot drawn where it will be clicked and coloured by what it is — door, person, pickup, puzzle, something to look at, dashed when it only appears later — and the parts of the screen the interface covers), a shot list (shotlist.csv: what to deliver, at what size, under what name, what the game uses now and whether it is a placeholder or missing), a copy of each current picture, an index.html contact sheet that sets guide and current picture side by side, and a README with the rules (no text or interface in the picture, panoramas must wrap, name each file .png). out is the folder (default build/handoff in the project). Returns the counts and one row per room.

Argument Type Required Description
out string

scene_diff#

What changed in the rooms between two versions?

Draws what changed in the rooms between two versions of the game, on one HTML page (index.html) — for a producer reviewing a week of edits, an artist who has repainted a room, or anyone asking who moved the door. A version is a git revision (HEAD~3, a tag, a commit), 'working' (the folder as it is now — the default for after) or a folder that holds a game/. Nothing is checked out or changed. Rooms are matched by id; hotspots by id within a room. A room is added, removed, changed (a hotspot added / removed / moved / edited, any other field such as music or overlays, its picture swapped, or the picture file under the same name repainted) or unchanged. For each room that differs the page shows the picture with the hotspots on it before, after, and both at once (gone red dashed, new green, moved amber with an arrow, edited blue) and lists the changes in words. Door links (links.json) are not shown — they only become hotspots when the game loads. out is the folder (default build/scene_diff in the project). Returns the counts and, per room that differs, its status and the changes in words.

Argument Type Required Description
before string yes
after string
out string

playtest_report#

Where did the playtesters get stuck?

Reads the notes playtesters wrote (a build run with --mf-telemetry, or the MF_TELEMETRY environment variable, or an export with the mfplaytest feature, writes one JSON line per event to a local playtest.jsonl — nothing is ever sent anywhere) and reports: sessions, how many won / lost / were left unfinished, typical and longest play time, per puzzle (testers, solved by, walked away, skipped, fails each, average solve time), per room (visits, testers, time per tester), which hints were asked for and how deep, where the unfinished sessions stopped — and a ranked list of the places worth a producer's attention with the reason in words. notes is a file or a folder of them; the default is the game's game/playtests folder (kept out of exports).

Argument Type Required Description
notes string

autoplay_game#

Let the bot play the game to its ending

A goal-driven bot plays the game through the REAL UI (no one at the keyboard) until it wins: in every situation it tries what it has not yet tried — each hotspot, each held item on the hotspots that take it, each recipe, a ringing phone, a text, a letter, every dialogue option, every puzzle solved, the accusation once the case can be made — and walks back through rooms it has not finished. A win proves the real game can be finished; a stall names the room it got stuck in, how many rooms and puzzles it reached and what it held. A mystery with several candidate culprits is played once for each. save_as writes the route it found to game/walkthroughs/.json (a regression test for a game that has none; one file per culprit gets a _ suffix). Complements run_walkthroughs (your own routes) and find_softlocks (the model, not the UI).

Argument Type Required Description
max_steps number
save_as string
culprit string

run_walkthroughs#

Replay the walkthroughs

Runs every game/walkthroughs/*.json (or just walkthrough_id) headless through the real game UI and reports pass/fail per step. A failure names the step, why it failed, and where the player was (scene, inventory, visible hotspots). Use after changing game logic to prove the main route still works.

Argument Type Required Description
walkthrough_id string

rename_id#

Rename an id and fix every reference

Renames a scene, item, variable, dialogue, puzzle, character, topic, clue or deduction AND rewrites every reference to it across the game (goto_scene/start_dialogue/start_puzzle/give_item steps, conditions, hotspots' use_items, item recipes, compass links, start_scene, dialogue speakers, hint speakers, dossier steps) — so nothing dangles. Scene/dialogue/puzzle files are renamed too. Refuses if the new id is invalid (snake_case) or taken. Prefer this to deleting and recreating; run validate_project afterwards.

Argument Type Required Description
kind "scene" \ "item" \ "variable" \
from string yes
to string yes

upgrade_engine#

Upgrade this game's engine copy

Brings this game's copy of the MysteryForge engine (addons/mystery_forge, the Studio addon, tools/, engine tests, missing project.godot keys) up to date with the engine this server ships, runs any game-format migrations, and stamps format_version. The old engine is backed up to .mf_backup//. game/ content and game/scripts/ are never touched except by a migration. Pass dry_run=true first to see what would change; afterwards run import_assets and validate_project. Each game carries its own engine, so this is how it adopts new engine features.

Argument Type Required Description
dry_run boolean

list_scripts#

List game-local scripts

Lists the GDScript files a game ships under game/scripts/: custom steps (actions/, used via {action:'run_script', script, args}), custom checks (conditions/, used via {script, args} in a condition list) and custom puzzle types (puzzles/, used as a puzzle's type). See docs/SPEC.md 'Custom scripts'.

No arguments.

write_script#

Create or update a game-local script

Writes game/scripts//.gd. kind: 'actions' (func run(mf, args) — may await), 'conditions' (func check(state, args) -> bool) or 'puzzles' (extends puzzle_base.gd; func build(config); emit solved/failed). Omit source to create the engine's commented starter template (refused if the script already exists); pass source to write or replace the whole file. Afterwards run validate_project: it checks the script exists/compiles and calls its optional validate()/validate_config() hook. Use scripts only for what the JSON format can't express.

Argument Type Required Description
kind "actions" \ "conditions" \ "puzzles"
name string yes
source string

delete_script#

Delete a game-local script

Deletes game/scripts//.gd. References from game data become validation errors until fixed.

Argument Type Required Description
kind "actions" \ "conditions" \ "puzzles"
name string yes

list_topics#

List conversation topics

Lists the things characters can be asked about (game/topics.json). Characters answer them in their talk.ask table (upsert_character); learn_topic steps teach them to the player. See get_spec 'Topics & conversations'.

No arguments.

upsert_topic#

Create or update a conversation topic

Creates or replaces a topic in game/topics.json: {id (snake_case), name (what the player sees), known? (true = known from the start), known_if? (conditions: the topic is also available whenever they hold)}. A topic is otherwise learned by a {action:'learn_topic', topic} step. Characters reply to it in their talk.ask table.

Argument Type Required Description
topic object yes

delete_topic#

Delete a conversation topic

Removes a topic from game/topics.json. Characters' replies to it and learn_topic steps for it become validation errors until removed.

Argument Type Required Description
topic_id string yes

list_regions#

List places (regions)

The location tree from game/regions.json: places that contain places (a house, its floors, a wing), each with a map picture, an optional automatic map layout, and defaults (music, ambient, transition, fx) its rooms inherit. A scene joins one with region: '<id>' (update_scene). See get_spec 'Regions & maps'.

No arguments.

upsert_region#

Create or update a place (region)

Creates or replaces a region in game/regions.json: {id (snake_case), name?, parent? (another region's id), map?: {background?, auto?: true = lay out rooms with no map_pos automatically}, map_pos? ([x,y] on its parent's map), music?, ambient?, transition? ('fade'|'dissolve'), fx? (a list of ambient effects stacked outermost first)}. Rooms with no setting of their own inherit the nearest place's music/ambient/transition/fx. Run validate_project afterwards.

Argument Type Required Description
region object yes

delete_region#

Delete a place (region)

Removes a region from game/regions.json. Places and rooms inside it move up to its parent (or the top level).

Argument Type Required Description
region_id string yes

List doors (links)

Lists the door links in game/links.json, each with the id the engine uses and the two hotspot ids it writes (link_a / link_b). A link joins two scenes from ONE entry — the way there and the way back, with the arrival camera turned to face into the room. See get_spec 'Links'.

No arguments.

Create or update a door (link)

Creates or replaces a door link in game/links.json: {id? (snake_case; default: the two scene ids joined), a: {scene, at: [x,y,w,h] (0..1 on the picture), label?, cursor?, compass? ('n'|'e'|'s'|'w'), arrive?: {yaw?, pitch?, fov?}}, b: {…same…}, visible_if?, actions? (run before the move), one_way? (only a gets a hotspot; b needs no at)}. Writes a goto_scene hotspot at each end at load; in a panorama the player arrives facing away from the door they came through. Run validate_project afterwards (unknown scenes, bad rectangles, clashing ids are reported).

Argument Type Required Description
link object yes

Delete a door (link)

Removes a door link from game/links.json (both hotspots disappear). Walkthrough steps that clicked link__a / _b become failing until updated.

Argument Type Required Description
link_id string yes

list_clues#

List clues

Lists the clues the player can find (game/clues.json). A clue is found by an {action:'add_clue', clue} step; found clues appear on the player's case board, where they can be connected into deductions (list_deductions). See get_spec 'Clues & deductions'.

No arguments.

upsert_clue#

Create or update a clue

Creates or replaces a clue in game/clues.json: {id (snake_case), title (the card's heading), text? (what it says), icon? (a path under game/assets/), group? (reserved for grouping)}. Add it to the game with an add_clue step (e.g. on a hotspot); test it with the has_clue condition.

Argument Type Required Description
clue object yes

delete_clue#

Delete a clue

Removes a clue from game/clues.json. add_clue steps, has_clue conditions and deductions that use it become validation errors until removed.

Argument Type Required Description
clue_id string yes

list_deductions#

List deductions

Lists the deductions the player can make on the case board (game/deductions.json).

No arguments.

upsert_deduction#

Create or update a deduction

Creates or replaces a deduction in game/deductions.json: {id (snake_case), name (the conclusion's heading), requires: [clue ids that must ALL be connected, and only them], text? (what the player concludes), actions? (steps run once it is made — unlock a topic, add a clue, set a variable)}. Two deductions can't connect the same set of clues. Test it with the deduced condition.

Argument Type Required Description
deduction object yes

delete_deduction#

Delete a deduction

Removes a deduction from game/deductions.json.

Argument Type Required Description
deduction_id string yes

list_contacts#

List phone contacts

Lists the in-game phone's contacts from game/contacts.json.

No arguments.

upsert_contact#

Create or update a phone contact

Creates or replaces a phone contact in game/contacts.json: {id, name, number? (digits/dashes; unique), saved? (default true: shown in the contact list; false = the player must dial the number), if? (conditions: reachable only when true), dialogue? (dialogue id started when the call connects), actions? (run after the dialogue)}. The Phone button appears in the game once any contact exists. A contact that isn't saved needs a number — or be rung by an incoming_call step (the phone rings; Answer runs its dialogue/actions, Decline or ringing out logs a missed call, leaves the voicemail and runs on_missed); add_text puts a message in its thread (with reply: a conversation the player can answer it with; needs an id), leave_voicemail leaves one. See docs/SPEC.md 'Phone, inbox & suspects'.

Argument Type Required Description
contact object yes

delete_contact#

Delete a phone contact

Removes a contact from game/contacts.json.

Argument Type Required Description
contact_id string yes

list_characters#

List characters

Lists all characters.

No arguments.

upsert_character#

Create or update character

Creates or replaces a character: {id, name, portrait, color?, portraits?, talk_frames?, portrait_video?, suspect? (true = listed in the Suspects dossier from the start), bio? (shown in the dossier), actor? ({height, feet?, facing?, poses: {idle, walk?, talk?, …}} — lets them stand in rooms; see get_spec 'Actors'), schedule? ([{scene, at, days?, phases?, if?, away?}] — where they are and when, needs project.json time; see get_spec 'Time & schedules'), talk? ({greeting?, ask: {topic_id: [reply…], '*': [reply…]}, show: {item_id: [reply…]}, farewell?, labels?} — what they say when asked about topics / shown items; reply = {if?, text?, voice?, emotion?, dialogue?, actions?, once?}; open it with a converse step; see get_spec 'Topics & conversations')}. portrait is a path under game/assets/portraits/. Speakers 'player' and 'narrator' are built in and need no entry.

Argument Type Required Description
character object yes

delete_character#

Delete character

Deletes a character. Refuses if used as a speaker, unless force=true.

Argument Type Required Description
character_id string yes
force boolean

list_variables#

List variables

Lists all declared variables (flags/counters) with their initial values.

No arguments.

set_variable#

Declare or update variable

Declares a variable with its initial value (bool, number, or string). All variables used in conditions/actions must be declared.

Argument Type Required Description
name string yes
initial boolean \ number \ string

delete_variable#

Delete variable

Removes a variable declaration. Validate afterwards — references to it become errors.

Argument Type Required Description
name string yes

list_dialogues#

List dialogues

Lists all dialogues with node counts and speakers.

No arguments.

get_dialogue#

Get dialogue

Returns the full JSON document of one dialogue tree.

Argument Type Required Description
dialogue_id string yes

upsert_dialogue#

Create or replace dialogue

Creates or replaces a dialogue tree: {id, nodes: {start: {speaker, text, voice?, actions?, choices?|next?}, ...}}. Must contain a 'start' node; the target 'end' exits. See get_spec section 'Dialogues'.

Argument Type Required Description
dialogue object yes

delete_dialogue#

Delete dialogue

Deletes a dialogue. Refuses if referenced, unless force=true.

Argument Type Required Description
dialogue_id string yes
force boolean

list_puzzles#

List puzzles

Lists all puzzles with their types.

No arguments.

get_puzzle#

Get puzzle

Returns the full JSON document of one puzzle.

Argument Type Required Description
puzzle_id string yes

upsert_puzzle#

Create or replace puzzle

Creates or replaces a puzzle: {id, type, name?, config, solve_once?, on_solve, on_fail?, skip_after?, skip_after_seconds?, difficulty?: {: {config?, skip_after?, skip_after_seconds?}}, close_up?: {picture?, board?: [x, y, width, height]}}. close_up plays it full screen on a picture of the thing itself (SPEC 'Puzzle close-ups'); a mechanism with config cards:false is then drawn as the machine alone. There are 55 built-in types (keypad, combo_lock, safe_dial, riddle, pin_tumbler, sliding_puzzle, jigsaw, arrange, hanoi, water_jugs, maze, pipes, lights_out, switch_board, wiring, simon, memory_match, sound_match, logic_grid, mastermind, nonogram, sudoku, word_search, spot_difference, sokoban, rush_hour, peg_solitaire, mirror_beams, crossword, nim, color_mixing, counterfeit_coin, cryptogram, river_crossing, radio_tuning, logic_circuit, balance_weights, ring_lock, word_lock, cipher_wheel, music_box, tile_twist, word_ladder, magic_square, mechanism, map_route, seating, liars, torch_bridge, knight_tour, gear_train, packing, cages, duel, pick) — call list_puzzle_types for each one's settings, defaults and limits, then check_puzzles to prove the result can be won (validate_project does too). difficulty gives each game difficulty level its own settings/assist as data; skip_after offers a Skip button after that many wrong tries.

Argument Type Required Description
puzzle object yes

list_puzzle_types#

List puzzle types

The built-in puzzle types and, for each, its label, one-line blurb, a starter config and every setting (key, kind, default, min/max, hint, whether it is required or translatable). Use it to author a puzzle's config correctly, then upsert_puzzle and check_puzzles. A game's own puzzle scripts that define meta() are described by the validator, not listed here.

Argument Type Required Description
type string only this puzzle type

check_budgets#

Check memory and size budgets

Measures what each room costs in video memory (every picture it draws × 4 bytes a pixel, or 1 when the import is VRAM-compressed, plus the always-resident icons and portraits), what a room plus the rooms one door away costs (they are preloaded), the biggest picture edge, and the game's size on disk — from the files' headers, in about a second even for 250 rooms. Limits come from project.json budget {scene_vram_mb, working_set_vram_mb, texture_max_px, game_disk_mb} over generous defaults. Returns the heaviest rooms with their heaviest pictures, a line per place, the game's totals, and issues (errors when a limit is broken).

Argument Type Required Description
top number how many of the heaviest rooms to list (default 10)

check_puzzles#

Prove every puzzle can be won

Runs each puzzle's own solver headless on every puzzle in the game — and on each difficulty level's merged settings — and replays the answer on the live puzzle model. Reports per instance: ok, errors (unwinnable or malformed settings), warnings (ambiguous nonogram, tight move limit…), the optimal move count where one is known, and a note. Types that deal a random board are proven over sample seeds. Custom puzzle scripts without meta()/analyze() are listed as not analysed.

No arguments.

delete_puzzle#

Delete puzzle

Deletes a puzzle. Refuses if referenced, unless force=true.

Argument Type Required Description
puzzle_id string yes
force boolean

list_assets#

List assets

Lists files under game/assets/. Optional kind filter: backgrounds, panoramas, items, portraits, voice, sfx, music.

Argument Type Required Description
kind string

check_assets#

Check assets (production audit)

Audits every file under game/assets/: size and format, image dimensions, whether anything uses it, whether it is still a placeholder (see set_asset_status), and production problems — a background that isn't the game's aspect (it would be cropped) or is smaller than the screen (soft), a panorama that isn't 2:1, an uncompressed WAV that should be OGG, an SVG with (Godot can't draw it), oversized icons. Returns {assets:[{path, kind, bytes, format, width, height, used, status, issues:[{severity, message}]}], summary:{total, placeholders, unused, need_attention, by_kind}}. Use it to decide which placeholder art/audio to replace next.

Argument Type Required Description
only "placeholders" \ "attention" \ "unused"

set_asset_status#

Mark assets placeholder / final

Records in game/assets/manifest.json whether assets are 'placeholder' (stand-in art/audio still to be replaced — what write_asset_text and generate_voice produce) or 'final'. check_assets and the Studio's Assets panel list what is still a placeholder. An optional note travels with the entry ("needs a painted version").

Argument Type Required Description
asset_paths string[] yes
status "placeholder" \ "final" yes
note string

convert_audio#

Convert a WAV/MP3 asset to OGG

Compresses a WAV (or MP3) asset to OGG Vorbis — about a tenth the size, which matters once voices and music are real recordings — using ffmpeg (or oggenc) if installed, then swaps it in like replace_asset: the OGG sits beside it, every reference is rewritten, the old file is removed. check_assets lists WAVs worth converting.

Argument Type Required Description
asset_path string yes

convert_video#

Convert a video to WebM (background job)

Turns a video into WebM (VP9 + Opus), the format the engine plays through the mf_video extension — smaller and sharper than Ogg Theora, and able to carry transparency. Two ways: source = an absolute path to any video ffmpeg reads (mp4, mov, avi, mkv, a ProRes-4444 .mov with alpha…) → saved as game/assets/video/.webm; or replace = an existing game asset such as an .ogv → converted and swapped in (references rewritten, like replace_asset). preset: 'cutscene' (default; up to 1080p, audio kept, keyframe every 5 s), 'loop' (silent looping background, smaller) or 'actor' (keeps the source's transparency — a character or effect over the room). Encoding takes seconds to minutes, so this returns a job_id at once: call convert_video again with job_id until state is done (the result has the path, sizes and a probe) or failed. Needs ffmpeg with libvpx-vp9 and libopus (doctor says). Afterwards check_assets flags production problems (wrong aspect, soft, slow seeking) and validate_project warns if the game lacks the extension.

Argument Type Required Description
source string absolute path of the video to convert
replace string an existing game/assets/… video to convert in place
name string file name (no extension) for a new clip
preset "cutscene" \ "loop" \ "actor"
max_height integer cap the height in pixels (default 1080; never upscales)
overwrite boolean
job_id string poll a job started earlier instead of starting one

replace_asset#

Replace an asset with final art/audio

Puts a local file (an absolute path on disk) in place of an existing asset, keeping the game working: same extension → overwritten in place; different extension of the same kind (PNG/JPG/WebP for an SVG, OGG/MP3 for a WAV) → saved next to it, every reference in the game rewritten, the old file removed. The asset is marked final. Run import_assets / validate_project afterwards.

Argument Type Required Description
asset_path string yes
source_path string yes absolute path of the replacement file

art_status#

Art pipeline status

The real-art workbook at a glance: every shot (id, kind, target, status todo/generated/accepted/rejected, candidates), counts per status, the effective style bible (defaults filled in), and which provider keys the MCP server's environment has (booleans only — keys are never shown). Start here. Shots are the pictures to make; run art_plan to create them from the game.

No arguments.

art_set_bible#

Set the art style bible

Edits game/art/bible.json — the look every picture must share. patch is merged into the stored bible (objects merge recursively, a null value deletes a key, arrays replace). Keys: style (prepended to every prompt), negative (things to avoid), camera, lighting (rooms only), palette [colors], providers {flat, panorama, edit} ∈ openai|skybox|mock, models {openai:{generate, edit, quality}, skybox:{style_id}}, seam_repair (bool), pricing {openai:{per_image}, skybox:{per_image}} (USD, for estimates), characters [{id, description, references:[paths]}] (the description rides along in every prompt that features them; references keep a face consistent). A strong, specific style paragraph is the single biggest quality lever — set it before generating anything.

Argument Type Required Description
patch object yes

art_plan#

Plan art shots from the game

Adds a shot to game/art/shots.json for every scene background / panorama, item icon and character portrait that is missing or still a placeholder (see check_assets), with a first-draft prompt built from the scene's name, group and hotspot labels, the item's description or the character's bio. Existing shots are left alone, so it's safe to re-run as the game grows. include_final also plans pictures already marked final. Refine prompts with art_upsert_shot, then art_estimate and art_generate.

Argument Type Required Description
include_final boolean

art_upsert_shot#

Add or edit art shots

Creates or updates shots in game/art/shots.json by id (omitted fields stay; null deletes a field). Fields: kind (background|panorama|portrait|item|variant|expression|image|pose), target (where the picture is saved: a .png under game/assets/), replaces (the placeholder it retires — references follow), scene|item|character (+expression) it belongs to, prompt (what to paint — the style bible, camera and character looks are added for you), n (candidates, 1–8), status (todo|generated|accepted|rejected; set 'rejected' to discard candidates), characters [bible character ids in the picture], references [image paths to match], provider (openai|skybox|mock; default from the bible), size (OpenAI WxH, multiples of 16), h_span (panoramas: degrees of a circle the picture covers, default 360; OpenAI makes wide vistas not wrap-arounds, so use ~110 and the scene's panorama is set to match when accepted). kind 'image' is delivered exactly as the provider made it (puzzle art, handouts). kind 'pose' is a full-length picture of an ACTOR (character + pose name): 'idle' is painted from the character's portrait, every other pose (blink, wave…) from the finished idle so it is the same figure in the same frame, and accepting one writes it into the character's actor.poses (a blink also turns on blinking); art_plan plans the idle for every character who stands in a room, then a blink once the idle is accepted; delivered 768 px tall and NOT trimmed, so poses line up. A VARIANT repaints one region of a finished picture: base (a shot id or asset path), mask [x,y,w,h] 0–1, scene + overlay (accepting adds that overlay to the scene), optional visible_if conditions. Changing a prompt-affecting field of a generated shot sends it back to 'todo'.

Argument Type Required Description
shots object[] yes

art_delete_shot#

Delete an art shot

Removes a shot from game/art/shots.json (a picture already accepted into the game stays).

Argument Type Required Description
shot_id string yes

art_estimate#

Estimate what an art run would cost

How many images (and, if bible.pricing has a per_image price for the provider, how many dollars) art_generate would use for one shot or every pending shot — without calling any provider. Real providers cost money: call this and tell the user the number before generating in bulk. Cached repeats are free.

Argument Type Required Description
shot_id string
all_pending boolean
n integer
provider "openai" \ "skybox" \ "mock"

art_calibrate#

Check a room's hotspots against its painted picture (vision)

A vision model looks at the scene's finished picture (its background or panorama image — not a placeholder SVG) and says where each LABELLED hotspot's object is; the hotspots that sit elsewhere are reported as 'nudge' (a rectangle or circle, with the shape that would fix it), 'review' (a polygon that looks off — never rewritten), 'missing' (not found in the picture) or 'no_answer'; the rest are 'ok'. With apply: true the nudges are moved onto what was found and the scene file is rewritten (otherwise nothing is written). provider 'openai' (default) needs OPENAI_API_KEY in the MCP server's environment and COSTS MONEY — a few cents per room: tell the user first, and check one room before a whole game. 'mock' is offline and free and only rehearses the steps (it 'finds' every object in the grid cell its position names). Reads the scene as saved on disk. The model's boxes are a proposal: look at the result (scene_diff / the Studio) before trusting a calibration, especially for small or hidden objects.

Argument Type Required Description
scene_id string the room to check
all boolean check every room that has a real picture and skip the rest (costs per room!)
provider "openai" \ "mock"
apply boolean move the nudged rectangles and circles onto what the model found (rewrites the scene files)
min_iou number overlap with the found box that counts as in place (default 0.5)

art_generate#

Generate art candidates (background job)

Asks the provider for candidates for one shot (or every pending todo/rejected shot) and returns a job_id at once — generation takes from seconds to minutes. Poll art_job until it's done; then look at the candidates (their paths are in the report; they are PNGs you can open) and art_accept the best, or edit the prompt and generate again. Panoramas go to Blockade Skybox and also keep a depth map; flat pictures to OpenAI (an edit when the shot has references or is a variant). Identical requests are served from a content-addressed cache for free (force: true asks again). Needs OPENAI_API_KEY / BLOCKADE_API_KEY in the MCP server's environment; provider 'mock' paints a free offline stand-in so you can rehearse the workflow. REAL PROVIDERS COST MONEY — art_estimate first, and never run all_pending without the user's say-so.

Argument Type Required Description
shot_id string
all_pending boolean
n integer candidates per shot (overrides the shot)
provider "openai" \ "skybox" \ "mock"
force boolean ignore the cache and ask the provider again

art_job#

Check an art generation job

State of an art_generate job: running (with the latest progress lines), done, or failed. When finished the report lists, per shot: ok, error, cached, candidates (project-relative PNG paths you can open to judge them), depth maps, cost estimate and provider usage. A failure carries the provider's own message (e.g. a content-policy refusal, a missing key, a rate limit).

Argument Type Required Description
job_id string yes

art_accept#

Accept an art candidate into the game

Puts candidate candidate (0-based) of a generated shot into the game: it is saved at the shot's target, every reference to the placeholder it replaces is repointed (or a brand-new picture is attached to its scene/item/character), the stand-in is removed and the picture is marked final, a variant's overlay is added to its scene, and provenance (provider, model, prompt, date) is recorded in game/art/provenance.json. Run import_assets and validate_project afterwards.

Argument Type Required Description
shot_id string yes
candidate integer

write_asset_text#

Write text asset (SVG)

Writes a text asset file (typically an SVG background, item icon, portrait, or overlay) under game/assets/. Godot rasterizes SVGs at import; authoring scene art as SVG is the fastest agent workflow. Avoid elements (not rasterized) — draw shapes; use 6-digit hex colours with opacity/fill-opacity (hsl() and 8-digit hex fills render solid black). Backgrounds should be 1920x1080, icons 256x256, portraits 512x512, and 360° panoramas (game/assets/panoramas/, used by a scene's panorama block) 2048x1024 equirectangular — the left and right edges must match.

Argument Type Required Description
asset_path string yes
content string yes
final boolean true = this is finished art, don't list it as a placeholder (default: it's a stand-in)

generate_voice#

Generate placeholder voice line

Synthesizes a spoken .wav placeholder via text-to-speech — macOS say, else espeak-ng/espeak on Linux/Windows (swap in real recordings later at the same path). output_path like 'game/assets/voice/hartley/hello.wav'. With macOS say, useful voices: Samantha (US), Moira (Irish), Daniel (UK), Karen (AU); with espeak, voice is a language code like en-gb.

Argument Type Required Description
text string yes
output_path string yes
voice string

list_voice_lines#

List spoken lines

Every line the game can speak — dialogue nodes, item descriptions, hint levels and show_text narration — with its speaker, whether it has a voice file yet, where a generated recording would go, and the placeholder voice each speaker would get. Use before generate_missing_voices, or to see what still needs recording.

Argument Type Required Description
only_missing boolean

get_score#

Get the adaptive score

game/score.json: the adaptive music tracks (stems that play together, each fading in and out with a condition), stingers (short cues over the music) and ambience beds (a loop with scattered one-shots). A scene's music may name a track and its ambient a bed; play_music takes a track id; play_stinger plays a stinger. See get_spec 'Music & sound'.

No arguments.

upsert_score_entry#

Create or update a track, stinger or bed

Creates or replaces one entry of game/score.json. kind 'track': {id, fade?, stems: [{id?, file, when? (conditions), db?, fade?}]}; 'stinger': {id, file, db?, duck_db?}; 'bed': {id, loop?, db?, oneshots?: [{file, every: [min,max seconds], db?}]}. Files are project-relative (game/assets/music/…). Run validate_project afterwards.

Argument Type Required Description
kind "track" \ "stinger" \ "bed"
entry object yes

delete_score_entry#

Delete a track, stinger or bed

Removes one entry of game/score.json. Scenes and steps that name it become validation errors until changed.

Argument Type Required Description
kind "track" \ "stinger" \ "bed"
id string yes

export_script#

Export the game's script for reading and review

Every line the game shows or says in reading order, as a document a writer or editor can read without playing: rooms with what happens in them, conversations as branching scripts (each line has a reference like hartley_intro/n3), characters' answers by topic, items, clues, hints, the phone, endings, achievements — with word counts per speaker. format 'md' (default) or 'csv' (one row per line: section, kind, speaker, text, ref, condition). comments: 'open' (default) pins open review comments where they belong, 'all', or 'none'. save_to (a path under the project, e.g. build/script.md) writes it to a file and returns only the stats.

Argument Type Required Description
format "md" \ "csv"
comments "open" \ "all" \ "none"
save_to string

list_review_comments#

List review comments

The notes pinned to places in the game (game/review/comments.json): {id, target, text, author, date, status 'open'|'resolved'}. A target is global, scene:, scene:#, dialogue:, dialogue:#, character:, item:, puzzle:, clue: or hint:. status filters; each comment says whether its target still exists (orphaned: false).

Argument Type Required Description
status "open" \ "resolved" \ "all"

add_review_comment#

Pin a review comment

Adds an open comment about a place in the game: target (see list_review_comments for the forms; it must exist), text, author?. Comments are shared through version control and left out of builds; export_script prints them where they belong.

Argument Type Required Description
target string yes
text string yes
author string

set_review_comment_status#

Resolve or reopen a review comment

Sets a comment's status to 'resolved' or 'open'; with delete=true removes it instead.

Argument Type Required Description
comment_id string yes
status "open" \ "resolved"
delete boolean

list_achievements#

List achievements

game/achievements.json: the things the player earns across saves — each with name, description, hidden?, icon?, when (conditions: earned the first time they hold), progress ({var, goal}: a counter), steam (the platform id). An achievement with neither when nor progress is earned by an unlock_achievement step. See get_spec 'Achievements'.

No arguments.

upsert_achievement#

Create or update an achievement

Creates or replaces an achievement in game/achievements.json: {id (snake_case), name, description, icon? (path under game/assets/), hidden? (true: the list shows ??? until earned), when? ([conditions]), progress? ({var, goal}), steam? (the platform's name; default: the id in capitals)}. Earned by when, by progress reaching goal, or by an {action:'unlock_achievement', id} step. Run validate_project / analyze_game afterwards: they flag one nothing can earn.

Argument Type Required Description
achievement object yes

delete_achievement#

Delete an achievement

Removes an achievement from game/achievements.json. unlock_achievement steps that name it become validation errors until removed.

Argument Type Required Description
achievement_id string yes

list_endings#

List the endings

game/endings.json: the named, tiered ways the game can end, BEST FIRST — each {id, name, result: 'win'|'lose', tier? (1-5 stars), text? (the epilogue), when? ([conditions])}. An end_game step arrives at the one it names (ending), else the first of its result whose when holds. The ending screen shows the name, the stars and the epilogue and counts the endings the player has found; find_softlocks reports which endings some play-through reaches and warns about one nothing reaches.

No arguments.

upsert_ending#

Create or update an ending

Creates or replaces an ending in game/endings.json: {id (snake_case), name, result ('win'|'lose'), tier? (whole number 1-5), text? (epilogue), when? ([conditions])}. A new ending goes LAST unless position (0 = first = tried first) is given — order matters: put the best, most demanding ending first and a no-condition catch-all last. Then name it from an end_game step (ending) or leave the step to pick the first that fits, and run find_softlocks to prove each ending can be reached.

Argument Type Required Description
ending object yes
position number

delete_ending#

Delete an ending

Removes an ending from game/endings.json. end_game steps that name it become validation errors until changed.

Argument Type Required Description
ending_id string yes

get_mystery#

Get the mystery model

game/mystery.json: who did it (culprit, or culprits — one drawn per new game), each suspect's clues for the means / motive / opportunity (and the clues that clears them), and the accusation (available_if, legs, need, attempts, on_solved / on_wrong / on_weak / on_failed). {} when the game has none. A {culprit: '<character>'} condition is true when that character is this game's culprit. See get_spec 'Mystery model & accusation'.

No arguments.

set_mystery#

Set the mystery model

Replaces game/mystery.json: {culprit | culprits: [..], suspects: [{id, means?: [clue ids], motive?, opportunity?, clears?}], accusation?: {available_if?, legs?: ['means','motive','opportunity'], need?, attempts?, on_solved?: [steps], on_wrong?, on_weak?, on_failed?}}. Characters and clues must exist (add them with upsert_character / upsert_clue first). Every innocent suspect should have a clears clue and every clue a suspect relies on should be findable by an add_clue step. Run check_mystery afterwards.

Argument Type Required Description
mystery object yes

delete_mystery#

Remove the mystery model

Deletes game/mystery.json. {culprit: …} conditions then fail validation until removed.

No arguments.

check_mystery#

Check the mystery is fair and solvable

Runs the engine's validator and story check and returns what concerns the mystery: unknown characters/clues, a culprit whose case can never be made (fewer legs with a findable clue than need), innocent suspects nothing clears, clues no add_clue step ever gives, and — with several candidate culprits — whether the game can be won for each of them (the story check analyses every candidate). Also says which candidates were checked.

No arguments.

production_report#

Production report: how finished each room is

For every room: its pictures (final, or still listed as placeholder in the asset manifest), its spoken lines (recorded / synthesized / missing / stale = edited since recorded), its validation errors and warnings, its memory cost and whether it is over budget, its puzzles — rolled into a completion percentage, least finished first. Also each place's average and how much of the game's text each language file translates. top limits the rooms returned (default 25).

Argument Type Required Description
top number

check_loudness#

Check the loudness of the game's audio

Measures every wav (and ogg/mp3 when ffmpeg is installed) under game/assets with ITU-R BS.1770-4: integrated loudness in LUFS and the sample peak, grouped by kind (voice, music, sfx, ambient…). Flags clipping (peak at full scale) and near silence as errors, and files more than tolerance LU (default 6) from their kind's median as warnings — a voice line recorded hot, a music bed far louder than the others.

Argument Type Required Description
tolerance number

normalize_loudness#

Bring the game's audio to a consistent loudness

Moves each WAV under game/assets to its kind's target loudness (voice -20, music -24, ambient -26, sfx -20 LUFS by default; override with targets), by a gain limited to +-12 dB and never past a -1 dBFS peak. Dry run by default: it reports what it would change. With apply: true it rewrites the files in place and keeps the first copy of each under game/art/loudness_originals/ (authoring-only, never shipped); revert: true puts them back. OGG/MP3 are never rewritten (normalise the source and import again). Run make import (or any tool that imports) afterwards so Godot sees the new samples.

Argument Type Required Description
apply boolean
revert boolean
targets object

export_vo_script#

Export the voice-over recording script

Writes one recording script per speaker — game/vo/.csv (or game/vo//.csv for a language pack) — with a row per line: id, speaker, kind, where it is, text, emotion, the file it should be recorded to, status (missing / placeholder / recorded / stale), seconds, notes. Hand a speaker's CSV to the actor; name their takes after the id (finch_intro/n3.wav, or finch_intro__n3.wav; _t2 marks a second take) and bring them back with import_vo_takes. only: all (default), unrecorded (missing + placeholder + stale), missing, stale (pick-ups).

Argument Type Required Description
speaker string
only "all" \ "unrecorded" \ "missing" \
language string a language pack code (fr, de…): the script for recording that language's lines

import_vo_takes#

Import recorded voice takes by line id

Matches the audio files in a folder (wav, ogg, mp3; subfolders fine) to lines by file name — the line id from export_vo_script, with / written as a folder or as '__' — picks the highest take (a _t2 / -take3 suffix) and the newest file, copies each to game/assets/voice/., points the line's voice at it, marks it final (so it no longer counts as a placeholder) and logs the text it was recorded from, so a later edit of that line shows as a pick-up in vo_status. With language, takes go to that language's pack (game/assets/voice//.) and the line's own voice is left alone. convert: also compress WAV/MP3 takes to OGG (needs ffmpeg or oggenc). dry_run lists what would happen.

Argument Type Required Description
folder string yes absolute path of the folder with the recorded takes
language string
convert boolean
dry_run boolean

vo_status#

Voice-over coverage and pick-ups

How much of the game is voiced: per speaker, lines recorded / still placeholder (synthesized) / missing / stale, the minutes of recorded audio (WAV takes are measured), and the pick-up list — lines edited after they were recorded, with their current text. language reports a language pack instead (lines with no recording in game/assets/voice//).

Argument Type Required Description
language string

generate_missing_voices#

Generate placeholder voices for every line without one

Batch version of generate_voice: synthesizes a spoken .wav for every line that has no voice yet (dialogue, item descriptions, hint levels, show_text narration), gives each speaker their own stable placeholder voice so a conversation reads like one, writes the files under game/assets/voice/ at the conventional paths, sets each line's voice field, and lists them as placeholders (replace_asset swaps in real recordings later at the same paths). Needs macOS say or espeak-ng. redo_placeholders also re-records lines whose current voice is a placeholder (after editing their text). Use limit to do a few at a time on big games.

Argument Type Required Description
redo_placeholders boolean
limit integer
voices object override the voice for a speaker id, e.g. {"mrs_hartley": "Moira"}

estimate_voices#

Estimate AI voices for the game (free — nothing is called)

Reads the voice casting (game/vo/casting.json: provider, model, a voice and a direction per speaker — get_spec 'Voice casting') and the game's lines, checks the casting, and prices recording every line that has no real recording yet: lines, characters, minutes of speech and dollars, per speaker. Makes NO call to the provider. speaker_ids / line_ids narrow it (e.g. a sample of a few lines). Lines this casting already recorded from the same text are left out, so after a partial run it prices only what remains.

Argument Type Required Description
speaker_ids string[]
line_ids string[]

record_voices#

Record AI voices (SPENDS MONEY — only with apply and a cap)

Records lines with the casting's provider (game/vo/casting.json; the key comes from OPENAI_API_KEY in the server's environment, never an argument). Run estimate_voices first and agree the cost with the user. Nothing is called unless apply is true; max_usd is a required cap — the run stops before the line that would cross it, and a later run continues where it stopped (lines already recorded from the same text and casting are skipped). Each recording replaces the line's voice file at its usual path (.ogg), stays a placeholder in the asset list (an AI read, not a performance) and is logged. Afterwards: mouth tracks (tools/lipsync.py) and normalize_loudness. speaker_ids / line_ids / limit record a sample first; output_path makes it an audition (takes to that folder, the game untouched).

Argument Type Required Description
apply boolean yes
max_usd number yes
limit integer
speaker_ids string[]
line_ids string[]
output_path string an audition: write the takes to this folder (absolute) and leave the game untouched

import_assets#

Import assets

Runs Godot's headless import (needed after adding images/audio outside this server's tools). run_preview and screenshot_scene do this automatically when needed.

No arguments.

validate_project#

Validate project

Deep-validates the whole game with the engine's own validator (referential integrity, action/condition correctness, asset existence, scene reachability). Returns structured issues with severity error|warning. Run after a batch of edits and before previews.

No arguments.

run_engine_tests#

Run engine self-tests

Runs the engine's headless test suite inside this project. Mostly for engine development.

No arguments.

run_preview#

Run game preview

Launches the game windowed for a human to play. Optional scene_id jumps straight into that scene with a fresh game state (skipping the menu). While the preview runs, JSON edits apply on F5 (reload) in-game; H toggles hotspot outlines.

Argument Type Required Description
scene_id string

stop_preview#

Stop preview

Stops the running game preview, if any.

No arguments.

screenshot_scene#

Screenshot a scene

Boots the game directly into a scene, captures a 1280x720 PNG, and returns it as an image — see exactly what the player would see. Use after editing backgrounds, overlays, or hotspot-heavy scenes. Set the scene up first when the picture you want is a state, not the room as it starts: open_container (a container id in this room: its panel is open), verb (a verb id: that verb is armed, the verb bar shows it pressed), give (item ids the player is already holding), set (variables to start with, e.g. {"drawer_unlocked": true}), show_hotspots (outline every hotspot — the quickest way to check boxes against a painted picture). Container / verb / give need the game's engine to be 0.66.3 or newer (upgrade_engine).

Argument Type Required Description
scene_id string yes
output_path string
open_container string
verb string
give string[]
set object
show_hotspots boolean

export_game#

Export a release build

Builds a shippable release of the game for a platform preset (Web, macOS, Windows Desktop, Linux), excluding the editor-only Studio addon and dev tools. Output lands under build//. Requires Godot export templates for the matching engine version to be installed; with no arguments, lists the available presets.

Argument Type Required Description
preset string
output_path string

blueprint_template#

A starting blueprint

Returns a small, valid blueprint — a mystery described as one document: the truth (culprit, means, motive, opportunity), the cast, the rooms with the exits, people and things in them (laid out automatically), the puzzles, the clues, who each clue proves or clears, the accusation and the endings. Edit it (or write your own to the same shape — docs/BLUEPRINT.md), run validate_blueprint, then scaffold_from_blueprint. Rooms never need coordinates; anything the sugar cannot say goes in as the game's own JSON (actions, conditions, dialogue nodes, raw hotspots).

No arguments.

validate_blueprint#

Validate a blueprint

Checks a blueprint before anything is written: every reference resolves (exits, dialogues, puzzles, items, clues, speakers), the culprit has a clue for means, motive and opportunity (two each is a case; one is a coincidence), every innocent suspect has a clue that clears them, every clue is given somewhere, rooms can be reached and doors can be come back through, a room is not over-full. Returns {ok, errors[], warnings[]}. Pure and cheap — no files are touched.

Argument Type Required Description
blueprint object yes

scaffold_from_blueprint#

Build a whole game from a blueprint

Turns a blueprint into a game folder at project_path in one call: the engine, every scene laid out with placeholder art and its hotspots, items, characters (with portraits), dialogues, puzzles, clues, the mystery and its accusation, hints, endings, a map. The blueprint is validated first and an invalid one writes NOTHING (the errors come back). Without apply: true it only validates and reports what would be written. With apply the folder is created (project_path must not already hold a game). The new game becomes the one every other tool edits (pass open: false to stay on the current one; open_project switches later). Afterwards: validate_project, analyze_game, find_softlocks, autoplay_game (records a walkthrough), then replace the placeholder art.

Argument Type Required Description
blueprint object yes
project_path string yes
apply boolean
open boolean

create_game#

Create a new game project

Scaffolds a brand-new MysteryForge game at project_path: copies the engine (Godot addon, validator, tests), writes project.godot, and creates a small but complete, playable starter mystery (two scenes, an item, a character with branching dialogue, a keypad puzzle that rewards a key, using that key to win) with its own art — a working example to edit, not a blank room. The classic studio model — same engine, new story and assets. The game also gets its own check suite (tools/check.sh) and a CI workflow that runs it on every push (docs/CI.md). The new game becomes the one every other tool edits (pass open: false to stay on the current one; open_project switches later).

Argument Type Required Description
project_path string yes
id string yes
title string yes
author string
open boolean

This page as Markdown: /agents/tools.md · Engine 0.101.0