IntegrationsIntermediate

MCP tool guide

A human-readable map of the project, scene, object, resource, spatial, physics, scripting, and support tools.

This page describes what each tool is for. The scopes that control which of them a connection can see, and the error codes they all share, are on Connect an MCP client.

Workspace and projects

accounts_list, projects_list, projects_create, projects_update, and projects_configure_multiplayer.

projects_list includes open branches with branch_of (main's project id, or null for main) and branch_name. Use branches_list to find closed branches too.

Updating a project

projects_update changes a project's own settings: its title, share_description, its two start scenes, and the same multiplayer fields projects_configure_multiplayer writes. The sharing description accepts up to 300 characters; blank text restores the default. Updating it preserves other startup settings. solo_start_scene_id names the scene solo play starts in (after the optional menu scene); it is the scene scenes_list marks is_initial, and it must be an active scene of the project. multiplayer_start_scene_id names the scene rooms start in unless a room option chooses another; it cannot be the menu scene, and null makes rooms fall back to the solo start. Both projects_update and projects_configure_multiplayer take both; the response carries solo_start_scene_id and multiplayer.start_scene_id. Republish to update the public card or apply a start-scene change. See Publish and test a game.

Both tools write only the fields you pass

An omitted field keeps its current value. This is what makes the two safe to mix: renaming a project through projects_update cannot disturb its multiplayer configuration, and reconfiguring multiplayer cannot rename it. Sending title alone is a rename and nothing else — it will not blank an action schema you set earlier.

The distinction that matters is between omitting a field and clearing it. To clear an object-shaped schema or template definition, pass {}; to clear lobby_choices or room_options, pass []. To leave a field alone, do not pass its key.

Configure multiplayer

projects_configure_multiplayer sets private-room availability, player limits, late joining, the authority-action schema, release-frozen weapon and entity templates, the presentation event schema, per-player lobby choices, and shared room settings. It takes account_id and project_id plus any of the settings below; like projects_update, it writes only what you pass. Pass an empty object to clear a schema or a set of templates. Changes affect the next release, so republish before expecting new rooms to use them.

ArgumentWhat it sets
enabledWhether players can create rooms for this game.
minimum_players1 through 8. 1 lets a room start with one player and fill up through late joining — the setting to use when one game should be playable both solo and together.
maximum_players2 through 8, and at least minimum_players, because a room that cannot hold a second player is a single-player game.
late_join_enabledWhether players may join a room that has started.
action_schemaThe requests a player may send with multiplayer.sendAction, keyed by action name and then field name. Up to 32 actions of up to 16 fields each; names are lowercase identifiers of at most 48 characters. Each field is {type, required}, where type is boolean, number (optional minimum/maximum), enum (values: 1–32 unique lowercase identifiers), or object_ref. An action with no fields is {}. Free-form strings are deliberately unsupported.
weapon_templatesUp to 32 weapons, keyed by lowercase ID. Each needs kind (hitscan or projectile), cooldownMs (0–60000), range, damage, teamPolicy (enemies_only, everyone, or self_only), and ammo — {"type": "unlimited"} or {"type": "finite", "capacity": n, "costPerShot": n}. A projectile weapon also names a projectileTemplate; a hitscan weapon may not. A weapon names no action and no owner types: an object fires only the weapons its multiplayer.weapons lists, from the mount each binding gives - where a shot leaves from is the object's, not the weapon's. The project page edits the same library as forms.
entity_templatesUp to 64 projectiles, keyed by lowercase ID. Each needs objectType (sphere, cube, or mesh, which also needs visualAssetId), an optional materialId, a collider (sphere with radius, box with extent, or capsule with radius and halfHeight, each with an optional offset), maxSpeed, gravityFactor (−10 to 10), lifetimeMs (up to 60000), collisionPolicy (first_impact ends it on anything it touches; bounce needs restitution (0–1) and maxBounces (1–16) and rebounds off scenery while a player still ends it; pierce needs maxTargets (1–8) and passes through players, damaging each once, while scenery ends it — each policy takes exactly its own options), maxActive (1–16: how many of this projectile one player may have live at once), and lateJoinPolicy (replicate). migrationPolicy and scenePolicy are optional and have no effect, because a room has no host migration and projectiles never survive a scene change; they are still accepted for older templates. maxActive is per player, 1 to 16 for each template; a room holds at most 16 live projectiles across every player and template, and refuses a launch past that.
event_schemaThe presentation events the room may send players, keyed by lowercase event name, up to 32. Each needs audience (owner, one player, or observers, everyone), delivery (reliable, resent until acknowledged, or unreliable, sent once), and fields in the action_schema field shape, plus an optional coalesce that lets a newer event replace an unsent one of the same name. action_refused, weapon_fired, and projectile_impact are sent by the room itself and cannot be declared. Events are for feedback only: anything a late joiner needs belongs in replicated state.
room_optionsShared lobby settings chosen by the connected lobby owner, as an ordered array of up to 8 enums. Each requires name, label, type: "enum", required: true, a valid default and 1–32 options. Options have value and label, optional description (up to 240 characters), image (a project PNG/JPEG/WebP/GIF asset ID) and scene_id (the scene UUID from scenes_list). One setting may select the starting scene; if one option names a scene, all its options must. Labels allow 48 characters; names and values are lowercase identifiers. No max, unique or template. A change clears human readiness. Start locks the selection before server/browser scene loading, and Lua reads it with multiplayer.getRoomOptions(). Available on both project update tools; [] clears it. See Build and test a multiplayer game for a complete map-choice example and ownership rules.
lobby_choicesWhat each player picks in the lobby before the room starts, as an ordered list of up to 8 choices; the lobby shows them in this order. Each has name (lowercase), label, type (enum or number), required, and an optional default. An enum lists 1 to 32 options, each {value, label}, optionally capped with max (1 to 8 players at once; unique is max 1), naming the spawn template it stands for, and showing an image (an image asset id from assets_list) as its lobby thumbnail. A number takes optional minimum, maximum and integer; without bounds it is any number within 1,000,000. There is no free text. The scene script reads a player's picks as participant.choices. Pass [] to clear them.
{
  "account_id": "acct_...",
  "project_id": "prj_...",
  "enabled": true,
  "minimum_players": 1,
  "maximum_players": 4,
  "late_join_enabled": true,
  "action_schema": {
    "enter_car": {}
  },
  "weapon_templates": {
    "rifle": {
      "kind": "hitscan",
      "cooldownMs": 250, "range": 80, "damage": 25, "teamPolicy": "enemies_only",
      "ammo": { "type": "finite", "capacity": 30, "costPerShot": 1 }
    }
  },
  "event_schema": {
    "round_over": {
      "audience": "observers", "delivery": "reliable",
      "fields": { "winner_slot": { "type": "number", "required": true, "minimum": 1, "maximum": 8 } }
    }
  }
}

The response, like projects_list, projects_create, and projects_update, carries the project's complete multiplayer block.

Scene objects carry the rest of a multiplayer game in their multiplayer field, through scene_objects_create and scene_objects_update — for example "multiplayer": {"playerSlot": 1, "weapons": [{"weapon": "rifle", "mount": {"x": 0, "y": 1.4, "z": 0.5}}]}. These are typed settings, not object variables, and a malformed one is refused when it is saved:

  • playerSlot, 1 through 8, binds a character or vehicle to a player. Only those two kinds can hold a slot. The slot decides who controls the object when a room starts and whose input its script reads; it does not move anything, so the object also needs a control script. A vehicle players will get into needs a slot too, or must be spawned from a spawn template, because only a slotted or spawned character or vehicle can be handed over with multiplayer.setController.
  • scriptRole, "authority" or "presentation", is required on every scripted object that is not slotted and is not a camera, GUI element or particle emitter (which always runs as presentation). "authority" runs its script on the room server and shares its movement with every player, at most 32 per scene; "presentation" runs it in each browser as decoration, with no collider in a room.
  • spawnTemplate, true, makes an object a spawn template: a room never builds it where it stands, and an authority script copies it, children included, with multiplayer.spawn(name, x, y, z, options) — pickups, enemies, crates, cars, or each player's character, spawned with the controller option from onPlayerJoined. A template has no slot, its name is unique in its scene, and only its root may have a script; a character or vehicle template's script is a control script any player may be given. A template's respawnDelayMs (0–60000) and killHeight are its copies' defaults; a spawn's own options win. A template may also set relevancy: always or scene (the default) sends its copies to everyone, owner only to the copy's controller, proximity to players whose controlled object is within relevancyRadius (greater than 0, at most 1000 units; required with proximity, refused with anything else), and explicit to the list multiplayer.setVisibleTo gives it. The controller always sees its own copy.
  • replicate, true, shares an unscripted physics object — a crate, a ball — from the room server without a script, within the same 32 per scene. It is refused on water: to raise or lower water for every player, give the water its own script with scriptRole: "authority" ("presentation" is refused on water too, because it takes the water out of the physics world). There is no scenery flag: scenery that never moves needs no multiplayer settings, and scenery a script animates takes scriptRole: "presentation".
  • weapons, a list of {weapon, mount} bindings, is what a character or vehicle may fire and where from: weapon is an ID from weapon_templates, and mount is the muzzle's {x, y, z} offset in this object's own frame (+Z forward, +Y up; a character's origin is at its feet), its origin when omitted. Two objects carry one weapon at different mounts without a second definition. A shot goes where the player is looking unless the binding adds "aim": "carrier": then it leaves along the object's own +Z, raised by elevation degrees (default 0, at most 89 either way; only with that aim) — use it for a vehicle's gun under a chase camera, e.g. {"weapon": "cannon", "mount": {"x": 0, "y": 1.2, "z": 3}, "aim": "carrier", "elevation": 10}. multiplayer.fire refuses any other as not_equipped, and publication refuses an ID the project does not define.
  • animation, on a character only, is its room animation: the clips every player's screen animates it with in a room, spawned copies of a template included. It takes the keys gameObject.enableAutoAnimation takes: a clip name (1–200 characters, matched exactly as written) for each of idle, walk, run, walkBackward, strafeLeft, strafeRight, forwardLeft, forwardRight, backwardLeft, backwardRight, turnLeft, turnRight, jump, fall, land, crouchIdle and crouchWalk; walkThreshold (0–20 m/s), runThreshold (0–50 m/s) and turnThreshold (0–20 rad/s); blendTime, oneShotBlendTime and landBlendTime (0–5 s); plus speeds, a playback rate from 0 to 10 for each of those states. A key left out keeps its conventional clip name or default, and an unknown key or out-of-range value is refused. Set it when the model's clips are not named idle, walk, run and so on: a control script's enableAutoAnimation reaches only its own player's screen, while this reaches every screen and wins over the script's configuration on all of them. A clip the model lacks falls back to the nearest one it has. A presentation script's playAnimation still takes the character over on that browser until releaseAnimation(). On any other kind of object it is ignored, and projects_publish_check warns ignored_multiplayer_setting. For example: "multiplayer": {"playerSlot": 1, "animation": {"idle": "Idle_Loop", "run": "Sprint", "speeds": {"run": 1.2}}}. See Build and test a multiplayer game.
  • The active camera's targetCharacterId should name a slotted object or a character or vehicle spawn template, or the camera should have followLocalPlayer set to true. Each browser then retargets the camera to its own player, and keeps it on whatever that player is handed, such as a vehicle.

Only a scene script receives actions, through onPlayerAction, so a game that declares actions needs scene_script_id set with scenes_update. The scene script is also the only script that may change scene in a room, with scene.loadScene or scene.restart; publication refuses either call in any other authority script. To give each player a character of their own instead of placing slotted ones, mark a character as a spawn template, call multiplayer.spawn(name, x, y, z, { controller = participant.id, respawnDelayMs = 3000 }) from the scene script's onPlayerJoined, and point the camera at the template. scene.createObject in a room makes an object only the room server sees. In Lua, a control script calls multiplayer.fire(templateId) and the room server resolves the shot; authority scripts send declared events with multiplayer.sendEvent. See Build and test a multiplayer game.

Project branches

Branches are separate editable project copies on Studio. All four tools below take account_id and project_id. Scopes remain flat: projects:write does not grant projects:read or the content tools' own scopes.

  • branches_list (projects:read) accepts main or branch and returns main_project_id and branches, including closed branches. Each branch has project_id, name and closed.
  • branches_create (projects:write, Studio) accepts main's id and name, a trimmed name of 1–80 characters unique among its open branches. It returns the new branch's project_id, branch_of and branch_name. Creating a branch from another branch returns nested_branch.
  • branches_diff (projects:read) accepts an open branch's id and creates a review. It returns review_id, main_digest, branch_digest, changes, conflicts, errors, unresolved_count, ready and stale. main_digest and branch_digest are concurrency tokens over the two sources as stored, taken before the branch's ids are remapped for comparison, so they differ even when nothing has changed; read changes.total for whether anything differs, ready for whether every conflict has a choice, and stale for whether either side has changed since the review. branches_merge confirms the merge and its ids only — it does not count applied writes; keep the review's changes as the record of what merged. Changes compare the base with the branch; conflicts also account for main. Change lists over about 100 KB are summarized, while conflicts remain available.
  • branches_merge (projects:write, Studio) accepts the branch's id, that review_id, and optional resolutions. Map each returned conflict's opaque key to "main" or "branch". Success returns merged: true, main's project_id and review_id, and closes the branch. Retrying the same successful review returns its success without applying it twice.

After creating a branch, use its returned project id with existing content tools and discover its scenes and resources again. Scene and resource ids are remapped; do not reuse main's ids. Object ids remain scoped to the remapped scene. Literal mapped UUIDs in stored Lua are rewritten, including comments; dynamically assembled ids and ids held outside the project are unsupported.

After edits, call branches_diff, inspect the changes, errors and conflicts, then pass the review and explicit choices to branches_merge. Conflicts contain key, section, id, name, base, main and branch. Choices apply to whole rows or top-level project settings, including delete/edit conflicts; Lua, GLSL, arrays and nested values are not merged field by field. Reordering alone does not merge.

stale_review means either source changed: obtain a new review before merging. turn_in_progress means an AI turn is active on either side; unresolved_conflicts requires explicit choices; invalid_merge means the combined result has invalid references. Correct the source or choices and review again. A closed branch refuses further edits and reviews with branch_closed; use its version history to inspect retained source.

Branches support local preview. Publishing and hosted test builds return branch_project; merge and publish main instead. There is no nested branching or update-from-main operation. After a downgrade, existing open branches can still be reviewed, but creation, content edits and merging require Studio and are refused with branches_plan, carrying requires_upgrade: true and required_feature: "branches". Closed branches retain source and live asset attachments, so their unique files still count toward storage; shared files count once and checkpoint-only files are exempt. See Project branches for the editor workflow and family lifecycle.

Checkpoints

checkpoints_list, checkpoints_create, checkpoints_changes and checkpoints_restore. A checkpoint is a copy of a whole project: every scene, object, material, script, shader, asset file and project setting. See Version history for the same feature in the editor.

  • checkpoints_list (projects:read) takes project_id and an optional limit (1-100, default 20) and returns the newest first. Each has an id, kind (manual, ai_turn, mcp, ai_result, publish, pre_restore or pre_merge), name, when it was taken, and its scene and object counts. version_history says whether the account's plan can take or restore one.
  • checkpoints_create (projects:write) takes project_id, a name (up to 200 characters) and an optional note. The checkpoint is pinned, so it is never pruned. Take one before a large or risky change.
  • checkpoints_changes (projects:read) takes project_id, checkpoint_id, an optional against and an optional detail, and changes nothing. With against now (the default) it compares the checkpoint with the project as it is now, which is exactly what restoring it would undo. Pass the mcp checkpoint taken before your first write to review your own edits. With previous it compares the checkpoint before this one with this one; a project's first checkpoint is compared with an empty project. from and to name the two sides, and to is null for the current project. changes has a section each for scenes, objects (every scene, each row naming its scene), materials, scripts, shaders and assets, each with added, removed and changed rows matched by id. It also has project settings and a total. A changed row lists fields as paths with before and after values (position.x, color[1]). An object can add a parent change by name and moved: true. A script or shader adds line-diff hunks with added_lines and removed_lines, and an asset adds file_replaced. detail summary drops the values and lines and keeps the field paths and counts. A full result over about 100 KB is summarized anyway, and detail in the response says which you got. truncated on a section means more rows changed than are listed (up to 500 per list), and more_fields on a row means more than 40 fields changed.
  • checkpoints_restore (projects:write) takes project_id and checkpoint_id and puts the whole project back. Everything changed since is replaced, so a pre_restore checkpoint of the current state is taken first; it is returned as pre_restore_checkpoint, and restoring it undoes the restore. When the current state already matches the newest checkpoint, no new one is needed and pre_restore_checkpoint is null — that newest checkpoint is the one to restore to undo. Open editors reload. The published game is not affected until the project is published again. A restore is refused with turn_in_progress while the AI assistant is working on the project, and with invalid_row or missing_file, changing nothing, if part of the checkpoint can no longer be restored.

A client does not need to checkpoint routine work. Before an MCP write, a mcp checkpoint named after the tool is taken unless any checkpoint — manual, publish, AI turn or mcp — was taken in the last 10 minutes, or the project is identical to the newest checkpoint. The capture happens before the write, and nothing snapshots the end of a burst, so take checkpoints_create yourself before a change you want a clean restore point for. On Free no automatic checkpoint is taken at all, though the write still goes through; a failed capture never blocks a write. Tools that change no content, such as scenes_open_editor_link and the upload tools, take none.

Checkpoints are part of the Creator and Studio plans. On Free, checkpoints_list still works, checkpoints_create and checkpoints_changes return forbidden and checkpoints_restore returns plan; each of those refusals also carries requires_upgrade: true and required_feature: "version_history", which is how to tell a plan gate from an ordinary scope or permission refusal (those carry neither).

Publishing

projects_publish_check, projects_publish, projects_publication_status, projects_preview, projects_unpublish, and projects_script_diagnostics. Publishing builds an immutable release of the project and serves it at the game's stable public URL — see Publish a game. For an agent the workflow is: check, fix, publish, poll.

Checking a game before publishing

projects_publish_check (projects:read) runs the same checks as the project page's Publishing section. It returns ready, which is true when projects_publish would start a build now, and eligibility, a code and message. The code is allowed, or why publishing is blocked: publishing_disabled, preflight_failed, publication_limit_reached (the plan's live-game limit), or publish_in_progress. It also returns three lists, plus optional suggestions — finish-work ideas, each with a priority, the evidence behind it and a hint, which never affect ready and are not a playtest, so raise them rather than acting on them unasked:

  • errors — problems that block publishing.
  • warnings — the "Before you share" list: things a player would run into, such as players with nothing to control or a camera that does not follow each player.
  • notes — informational, such as which multiplayer runtime each script runs in.

Every issue has a code and a message. Where it is about a specific thing it also names it — scene_id/scene_name, object_id/object_name, script_id/script_name, asset_id/asset_name, or material_id — plus code-specific keys such as slot or missing_slots. Errors and warnings with an obvious fix carry a hint:

{
  "code": "incomplete_multiplayer_slots",
  "message": "Scene Initial Scene binds no object to player 2, 3, and 4, who will join with nothing to control.",
  "scene_id": "…",
  "scene_name": "Initial Scene",
  "missing_slots": [2, 3, 4],
  "hint": "Give each listed player something to control: …"
}

One warning is about rendering cost rather than correctness: point_light_cost, for a scene with more than 8 point lights whose castShadow is false and no point light budget. It carries point_lights (how many) and unlimited_range (how many have no range, a distance of 0 or none) as well as the scene. Fix it with scenes_update's performance.point_light_budget, and give those lights a distance; see "Scene settings" below.

Another is soft_body_cost, for a scene whose soft bodies add up to more than 4,000 vertices × iterations (five spheres at the default settings are just over it). It carries soft_bodies (how many), soft_body_vertices (their estimated vertices), solver_work (the vertices × iterations total) and heaviest_object_name (the costliest one) as well as the scene. Fix it with soft_bodies_update: fewer segments, iterations 4 or 5 and a bend_type of distance or none, or remove some soft bodies; see "Specialized creation" below.

The check walks every scene and asset, so run it after a change rather than in a loop.

Publishing and following the build

projects_publish (publishing:write, account admin) publishes the project, or republishes it with the editor's current changes. It returns at once with the new release — status: "building" and its progress — and a next_step. A refusal is ok: false with the same codes as eligibility above; a preflight_failed refusal also carries the hinted errors and warnings.

projects_publication_status (projects:read) says what is live and what is building: published, publication (public_url, active, published_at; null if the game was never published), current_release, building and the building_release itself, the five most recent releases in recent_releases, and unpublished_changes. Each release has a status — building, ready, active, superseded, or failed — its progress, and an errorCode and errorMessage when it failed. superseded covers both a release replaced by a newer one and the release of a game that was unpublished (its progress label reads "No longer active"); whether the game is live is published, not any release's status. It is cheap: poll it every few seconds after publishing until the release is active or failed.

projects_preview (projects:read) shows the live published game as a poster card — its release title, preview image and public play link — in a client that supports MCP Apps, and the same fields as JSON (title, public_url, image_url, release_version, published_at) in one that does not. image_url is null when the release has no usable preview image; that is still a successful response. It never publishes, never previews a draft and never opens an editor, and a project with no live game returns not_published; use projects_publication_status to follow a build.

projects_unpublish (publishing:write, account admin) takes the game offline. The URL is kept, so publishing again restores the same address. Calling it on a game that is not live does nothing, and the response's was_published says which case it was.

Errors from live rooms

projects_script_diagnostics (projects:read or scripts:read) returns the Lua errors the published game's multiplayer room servers caught — the same data as the project's room script errors page. Each distinct error appears once however many rooms hit it, with the script, callback, message, stack, scene and object, the number of occurrences and rooms, when it was first and last seen, the release it was last seen in (releaseId), and an editorPath to its scene in the editor, which is null once that scene has been deleted. Errors from the editor's Test in a room rooms, which run an unpublished draft, are left out unless you pass include_test_rooms: true. A game that was never published returns not_published.

If your MCP client still shows an older project-settings schema without room_options, refresh its tool list or reconnect before configuring shared settings.

Testing in a multiplayer room

Room-only Lua — onPlayerJoined, the multiplayer game state, actions and spawning with a controller — does not run in physics_run_simulation. These three tools are the editor's Test in a room: the project's current draft runs in a real room on a multiplayer server, with the game's own authority scripts, and the room enforces the game's minimum players and required lobby choices. Nothing is published.

  • multiplayer_test_start (publishing:write; any member of the account with a player profile) builds the draft as a test build, or reuses the last one if nothing has changed, and opens a test room with you in slot 1. It returns at once with the test_run, build (started, joined or reused) and existing: true when the project's open test was handed back instead. A refusal is ok: false with test_rooms_unavailable (not on this plan, or switched off), player_profile_required, test_room_in_use (another project holds the account's one test room; project_id and run_id name it), rate_limited, test_minutes_exhausted (with test_minutes, below), test_rooms_budget_paused, no_servers_available, invalid_bots, or preflight_failed with the hinted errors and warnings. bots, bot_brain and fill_to_minimum seat bots when the room opens, and bot_timelines seats bots that replay input and actions you write (see Bots and Timeline bots below).
  • multiplayer_test_status (projects:read) returns the run as the Test run panel shows it: stage (building, queued, waiting_for_server, no_servers, ready, running, ended or failed), the build's progress, cold_start (no server is idle, so one has to boot first), the room, each participant's slot, handle, ready state, lobby choices made and missing, and connection, the authority scripts' Lua errors in script_errors, start_blocked (why the room cannot start yet, naming the player), invite_url, end_reason or error, and a next_step. Pass test_run_id, or leave it out for the project's most recent run. Poll it every few seconds.
  • A test run with shared settings may be ready while its authority is still pending: open invite_url, choose shared settings as the lobby owner, ready the players and Start. The server is assigned and the chosen scene loads afterwards. Status includes room.room_options and room.initial_scene_id (null until Start). These are shared room values, separate from each participant’s choices.
  • multiplayer_test_stop (publishing:write) ends the room with end_reason: "test_ended" and frees the account's test room.
  • multiplayer_test_add_bot (publishing:write) seats bots in the run's room: count (1 to 3), brain (wander, idle, roam or script) and optional choices (lobby choices by name, for example {"team": "crimson"}). Without them it uses the game's suggested brain and choices, if any. It works while the room waits and, in a game with late join, after it has started. A refusal is ok: false with bots_unavailable, room_not_open, room_not_joinable, room_full, too_many_bots, invalid_brain or invalid_choices.
  • multiplayer_test_remove_bot (publishing:write) takes a bot's participant id (ptc_… of kind bot) and frees its seat. The scene script's onPlayerLeft fires for it and whatever it controlled is released, as for a person who left. Removing the last bot never ends the room.

People still play the test: once the stage is ready, each player opens invite_url in a browser signed in as a member of the account (you too), picks any lobby choices and presses Ready, and you press Start game in the lobby. A room ends on Stop, when everyone has left, or after 15 minutes of play, and the account has one test room at a time and its plan's included test minutes each UTC day (60 on Creator, 120 on Studio). Past them, an account whose admin turned on paying for extra minutes from credit (Subscriptions page) keeps testing, charged by the second of server time from its credit balance, up to its own daily limit if it set one.

multiplayer_test_start and multiplayer_test_status both return test_minutes, the account's minutes today: included_minutes_per_day, used_seconds, included_seconds_left, use_credit, price_per_minute_usd, daily_cap_usd (null when there is no limit), spent_today_usd, paid_seconds_available (whole seconds the credit balance can still pay for, after holding back what rooms not yet charged could cost, and within the daily limit), seconds_available (included and paid together; a room still runs at most 15 minutes), resets_at and settings_url. A test_minutes_exhausted refusal carries it too, and its message says which limit was reached.

Bots

A test room can seat up to three bots, so one person can test a game whose minimum players or teams need others. Pass bots (0 to 3) to multiplayer_test_start to seat that many when the room opens, or fill_to_minimum: true to add as many as the game's minimum players needs, or suggested_bots: true to seat the number the game suggests (below); bot_brain picks how they play. Each bot takes a real seat under the room's size and joins ready with a valid lobby selection — the choices you asked for, else the game's suggested choices while they have room, else a free default, else the least-taken option, else a number's minimum. The room's own server plays it with a brain:

  • wander (the default unless the game suggests another): a random walk with the odd jump and primaryFire.
  • idle: no input.
  • roam: walks the bot's character between random reachable points on the scene's navigation mesh along scene.findPath routes, each within 4 to 14 m of its home (where the game last placed its character, so a kickoff or respawn moves it), walks straight home for a few seconds when stuck or without a route, and wanders where there is no mesh. It learns whether the control script turns toward input.aimYaw or moves along fixed world axes from which way its input actually moves the character.
  • script: the scene script's onBotThink(bot, dt) decides its input; see Lua scripting overview. A script bot in a game without onBotThink stands idle, and the room reports that once in script_errors.

Bots give way to people. A person who picks a lobby option that is full only because a bot holds a place in it takes that place: the most recently joined such bot moves to another option with room, or leaves if none has room. A person joining a room whose seats bots fill takes the most recently joined bot's seat. A bot never displaces another bot, and a person is never refused because of one. A bot that moves after the start changes its choices mid-game.

Suggested bots. projects_configure_multiplayer takes suggested_bots: {count, brain, choices} (count 0 to 3; choices checked against the project's lobby choices; {} clears it), and the project's multiplayer summary includes it. The host still decides: multiplayer_test_add_bot and bot_brain default to the suggested brain and choices, and multiplayer_test_start seats the suggested count only with suggested_bots: true (refused with invalid_bots when the game suggests none). A suggested choice that is full in the room is picked for the bot instead. The run's bots block adds suggested (or null) and suggested_to_add.

The run lists bots in participants with kind: "bot", a brain and no player_id, and adds a bots block: enabled, limit, brains, can_add, available (how many more bots the room can take) and needed_for_minimum (how many bots would bring the room up to the game's minimum players). participants is the room's history, not its seating: a bot you removed stays listed with connection: "left", which is not a failed removal. available already accounts for joined players, the bot cap, whether bots are enabled and whether the room is still joinable (it is 0 once it is not), so read it rather than subtracting the participant count from maximum_players. Scripts see a bot as a participant — onPlayerJoined fires for it, multiplayer.spawn with its id as controller gives it an avatar, and participant.isBot is true; see Multiplayer games. Bots test the game's rules and scripts, not the network path a browser takes, so a person should still play before you publish.

Timeline bots

A timeline bot plays exactly what you write instead of deciding anything, so a test can repeat the same moves every time: walk here, turn, shoot at three seconds, leave at twenty. Pass bot_timelines to multiplayer_test_start, a list of timelines, each:

{
  "choices": {"team": "azure"},
  "inputs": [
    {"at_ms": 0,    "inputs": {"moveAxisY": 1}},
    {"at_ms": 4000, "inputs": {"moveAxisY": 0, "lookAxisX": 1}},
    {"at_ms": 6000, "inputs": {"lookAxisX": 0, "aimYaw": 1.57}}
  ],
  "actions": [{"at_ms": 3000, "name": "shoot", "payload": {"power": 1}}],
  "join_at_ms": 0,
  "leave_at_ms": 20000
}
  • Times. Every at_ms counts from the moment the room starts, not when the bot was seated. Nothing plays while the room waits in the lobby. Times run from 0 to 900000 (the room's 15 minutes).
  • inputs (at most 100 entries) use physics_run_simulation's input_sequence vocabulary: the booleans moveForward, moveBackward, moveLeft, moveRight, moveSprint, jump, primaryFire, crouch and the look keys; the axes moveAxisX, moveAxisY, lookAxisX, lookAxisY, lookDeltaX, lookDeltaY; and actions and actionValues. They also take aimYaw and aimPitch in radians, as onBotThink returns them (yaw from +Z toward +X). device and gamepadStyle are refused. An entry changes only the inputs it names, so what it leaves out keeps its value.
  • Aim. A room carries the bot's aim, not a camera:
    • held look (lookAxisX/lookAxisY or the look keys) turns the aim for as long as it is held;
    • lookDeltaX/lookDeltaY turn it once, by 0.003 radians a unit, as a mouse turns the camera;
    • aimYaw/aimPitch set it outright.
    The aim starts level, facing the way the bot's character faces when it first gets one, as a person's follow camera starts behind their character. A turn made before then counts from that facing, and an aimYaw set before then is kept.
  • The game decides what the move axes do. A timeline drives the bot as a person's keys or stick would, through the game's own control script. A script that moves relative to input.aimYaw walks the bot the way it is aiming. A script that reads the axes as fixed world directions ignores the aim. For example, Futbol Fan's controller moves moveAxisY along world −Z, so holding it there runs for the far touchline, just as it does for a person holding up. Read the control script before writing a timeline, or try one short timeline first.
  • actions (at most 50) are authority actions, raised once each at their time as if the bot had called multiplayer.sendAction. Each one is checked against the game's action schema when you start the run, with the same rules the room applies. A wrong name, a missing required field, a value out of range or an unknown field is refused with invalid_bots, and nothing is built. For example: bot_timelines[0].actions: shoot needs power.
  • Joining and leaving. A timeline with no join_at_ms, or with 0, is seated when the room opens, like any requested bot, and counts toward minimum players. A later join_at_ms joins that long after the start, which needs a game with late join. leave_at_ms frees the bot's seat at that time, and must come after the join. Each timeline joins and leaves at most once.
  • Limits. choices are lobby choices by name, as for multiplayer_test_add_bot. Timelines and bots share the room's three bot seats.

multiplayer_test_status adds a bot_timelines list, one entry per timeline:

  • key;
  • state: pending, seated, left or refused;
  • refused: why a join was turned down, one of room_not_joinable, room_full, too_many_bots, invalid_choices or bots_unavailable;
  • participant_id, choices, join_at_ms and leave_at_ms;
  • inputs and actions: how many entries of each the timeline has.

Each bot in participants carries the timeline key it plays, if any, and an input report from the room's server, refreshed every few seconds:

  • frames: input frames sent;
  • input_refused: frames the room's command gate refused, by reason;
  • inputs_applied and actions_sent: how far its timeline has got;
  • reported_at.

A bot that sent frames with none refused, and every input and action counted, played its whole timeline. Whether the game did what you expected is a separate question: check the game state and script_errors.

Unattended scenarios

multiplayer_scenario_start, multiplayer_scenario_status and multiplayer_scenario_cancel run the project's current draft unattended in a real hosted test room with one to three timeline bots and no person in it: the authority scripts, Jolt physics, joins and departures, actions and the shared game state are tested; browser networking, prediction and presentation are not, and bots still have participant.isBot true. Nothing is published, and the run spends the account's one test room and its test minutes like any test. They work only where hosted scenarios are enabled on the server; otherwise the start call refuses with scenarios_unavailable.

multiplayer_scenario_start (publishing:write; a member with a player profile) takes account_id, project_id, a request_key (8 to 100 letters, digits, underscores or hyphens; send the same key only to retry the same request — the same key with different arguments is refused with request_key_conflict, and the same key and arguments hand back the existing run with existing: true), bot_timelines (one to three, in the Timeline bots format above), and optionally duration_ms (1,000 to 120,000, default 30,000), room_options (shared settings by name) and up to 8 assertions, each {key, equals, within_ms}: it passes when the top-level multiplayer.getGameState() key equals the scalar (a string of up to 256 bytes, a number, a boolean or null) by within_ms of simulated time (default: the end). Every timeline event must come before the end, a bot cannot act before it joins or after it leaves, the bots seated at the start must meet the game's minimum_players and fit its maximum_players, a later join_at_ms needs late join, and the whole definition is at most 32,000 bytes. A refusal is ok: false with invalid_scenario (the message says what), scenarios_unavailable, request_key_conflict, not_a_member, or any of multiplayer_test_start's refusals, test_room_in_use and preflight_failed included; another open test of the same project is never reused or stopped. It returns at once with scenario (run_id, stage, build_id, definition, result, coverage, created_at, ended_at) and test_minutes.

multiplayer_scenario_status (projects:read) takes run_id and returns the same scenario; polling never drives the run. result is null until the run ends, then carries a verdict and reason: passed (scenario_completed: the simulation ran its whole duration, every timeline input was applied and every action reached a handler, every assertion passed and complete diagnostics arrived); failed (script_errors, action_or_input_refused, assertion_failed); inconclusive (incomplete_evidence, simulation_incomplete, participant_missing, join_not_observed, departure_missing, bot_evidence_missing, timeline_incomplete — a startup failure, lost authority, a scene transition or a missing final report); or cancelled. Incomplete evidence never passes, and a clean error log is not proof that a callback ran, so include an assertion that proves the behaviour you are testing.

multiplayer_scenario_cancel (publishing:write) stops the run and frees the room; a result already recorded is kept. multiplayer_test_add_bot and multiplayer_test_remove_bot refuse a scenario's room with automated_test, and multiplayer_test_status on one points you back to these tools. Results are kept for 30 days with the test run.

Scenes

scenes_list, scenes_create, scenes_update, scenes_delete, and scenes_open_editor_link.

Creating a scene

scenes_create takes a name and gives the scene the same starter content the editor does: lights, a camera, a platform, and a couple of shapes. Pass skip_default_objects: true to start empty, for example for a menu or title screen. set_as_initial: true makes the new scene the one the game starts in, inherit_sky_from copies the sky, skybox, environment lighting, fog, tone mapping, bloom and ambient occlusion settings of another scene by its ID (not its reverb), and display_order sets its position in the scene list. A scene's name is set here and cannot be changed through scenes_update.

Scene settings

scenes_update is where everything that belongs to a scene rather than to an object is set. Each argument is independent: omit one to leave it untouched, or pass null to clear it.

ArgumentWhat it sets
scene_script_idThe scene script, from scripts_list; null detaches it. A scene with no scene script never receives onPlayerAction, so authoring a script and forgetting this step is the usual reason a game looks unresponsive.
collision_groupsThe Jolt collision-group filter tables. Each entry defines one group_id's exempt subgroup pairs; objects opt in through their own collisionGroupId and collisionSubGroupId. See Collision groups.
navigationThe walking agent the navigation mesh is baked for — radius, height, max climb, and max slope, plus an optional cell_size (by default half the agent radius, 0.2 m for the default agent). Leave cell_size unset: the bake runs in a background worker in the editor and published player, so raising it no longer makes a bake meaningfully faster, and a cell larger than the agent radius closes narrow walkways. With the default agent, a walkway with drops on both sides needs about 1.5 m at 0.2 m, 2.75 m at 0.4 m and 5 m at 0.75 m. See Vehicles, constraints, ragdolls, and navigation. Defaults suit a person (0.4, 1.8, 0.4, 45°); set it when agents are much larger or smaller. null restores the defaults.
musicBackground music that autoplays when the scene loads: an audio asset_id, plus optional volume, loop, and fade-in.
skyThe sky, as in Scene Settings: elevation (sun height, -10 to 90°), azimuth (0 to 360°), turbidity (1 to 20), rayleigh (0 to 4), mie_coefficient (0 to 0.1), mie_directional_g (0 to 1) and brightness (0 to 2, default 1). brightness multiplies the sky dome's colour and, when environment_lighting is enabled, the lighting baked from it; lower it (around 0.5) when aces or agx tone mapping at an exposure of about 1 or more washes the sky out to white, instead of lowering the exposure. A scene saved without it renders at 1, unchanged. Send only the keys to change; the rest keep their values. null restores the defaults, including brightness 1. An open editor updates live.
skyboxAn equirectangular image (twice as wide as it is tall) drawn in place of the procedural sky: asset_id, one of this project's image assets — a sky from assets_generate_sky or an uploaded panorama — plus rotation (0 to 360°, default 0), which turns the image about the vertical axis, and brightness (0 to 2, default 1), which multiplies its colour and, when environment_lighting is enabled, the lighting baked from it. asset_id is required when the scene has no skybox yet; after that, send only the keys to change. null goes back to the procedural sky. While a skybox is set the sky settings draw nothing, and fog does not cover the image, so match the fog colour to its horizon. An asset from another project, or one that is not an image, is refused, and publish checks report a skybox whose asset has been deleted. An open editor updates live.
fogDistance fog, which fades far geometry into a colour: mode (none, the default, linear or exponential), color in sRGB as in CSS, either {r, g, b} with each channel 0 to 1 (a hex code's channels divided by 255) or a hex string such as "#a0b4c8", and for linear fog near (0 to 5000 m) and far (1 to 10000 m, greater than near), for exponential fog density (0 to 0.2). The sky is not fogged, so pick a colour close to the sky at the horizon. Send only the keys to change; null turns fog off and restores the defaults. An open editor updates live.
environment_lightingOpt-in lighting and reflections on Standard and Physical materials from the visible procedural sky or skybox panorama. enabled defaults to false; intensity ranges from 0 to 2, default 1, and changes lighting without changing the background. The source includes sky brightness and panorama rotation. Send only changed keys; omitted keys keep their values, and null resets lighting to off. For example, {"enabled":true,"intensity":0.7}. Works in the editor, Preview and published games. Measure target-device cost before enabling it for phone-first games.
tone_mappingHow the renderer maps lighting to screen colour: mode (none, the default, aces, agx, neutral, reinhard or cineon) and exposure (0.1 to 4, default 1). aces is the filmic look most games use. Every mode but none rolls off bright highlights instead of clipping them, which usually wants brighter lights or a higher exposure. null restores the defaults. An open editor updates live.
bloomA glow around the brightest parts of the frame — emissive materials and strongly lit surfaces: enabled (default false), strength (0 to 3, default 0.6), radius (0 to 1, default 0.4) and threshold (0 to 2, default 0.85). The sky is never bloomed, so give anything that should glow an emissive material. It costs a few full-screen passes per frame, a large share of an older phone's frame (with ambient occlusion already off, turning bloom off took one test scene on an iPhone 13 Pro Max from 36 to 60 fps), so leave it off in a game played mostly on phones unless the glow matters. In Preview and published games, a device still too slow with ambient occlusion already off (below 30 fps, or 55 fps on a phone or tablet) turns bloom off on its own. null turns it off. An open editor updates live.
ambient_occlusionScreen-space ambient occlusion, soft contact shadows where surfaces meet: enabled (default false), quality (low, at half resolution with 8 samples, the cheapest but still costly on phones: one test scene on an iPhone 12 mini ran at 36 fps with medium, 43 with low and 55 with it off, so leave it off in a game played mostly on phones; medium, the default, at full resolution with 16; or high, 24 samples and a wider denoise), intensity (0 to 1, default 1), radius (0.05 to 5 m, default 0.5) and distance_falloff (0 to 1, default 1). Only opaque geometry casts or receives it: transparent and alpha-tested materials, water, the sky, lines and GUI are left out. It renders the scene's depth and normals a second time and adds several full-screen passes per frame; meshes wholly beyond linear fog's far are left out of that second render. In Preview and published games, a game held below 30 fps, or 55 fps on a phone or tablet, steps it down on its own (to lower qualities, then a mode that draws no second geometry pass, then off, then bloom off) and climbs back after a sustained stretch above 50 fps (about 58 on a phone or tablet, which does not climb back to a step it has already given up); the editor always shows the authored setting. Send only the keys to change; null turns it off and restores the defaults. An open editor updates live.
reverbThe echo of a space on the sound effects: preset (none, the default, room, hall, tunnel, stadium or cave), wet (the mix, 0 to 1, default 0.3) and include_music (default false, so music stays dry). Send only the keys to change; null restores the defaults. Scripts can change it during a run with scene.setReverb. It is heard in each player's browser, never on a multiplayer room's server.
performanceRendering cost controls for weak GPUs (integrated graphics, older laptops, phones), as in the Performance section of Scene Settings: point_light_budget (a whole number, 0 to 16, default 0, which is off), render_scale (0.5 to 1, default 1) and adaptive_resolution (default false). They apply in Preview and the published game; the editor viewport always shows the scene as authored. Every point light is shaded on every lit pixel of every lit material whether or not its light reaches it, so a large level with many lights pays for all of them everywhere, and a range alone saves nothing. point_light_budget shades at most that many at once: the scene's non-shadow point lights are replaced by that many fixed stand-ins (so shaders compile once), given to the lights brightest at the camera, re-picked about four times a second as it moves and faded in and out over about 0.35 s. A stand-in copies its light's position, colour, intensity, distance and decay every frame, so scripts that move or dim lights still work. Shadow-casting point lights are always shaded and not counted, and a point light casts shadows unless castShadow is false. Set it when a scene has more than about 8 point lights spread over a large area, and give each of those lights a range (its distance) so a light the camera is out of range of counts for nothing. render_scale is the fraction of the screen's resolution the scene renders at; 0.5 shades a quarter of the pixels. adaptive_resolution lets a device that is too slow (below 30 fps, or 55 fps on a phone or tablet) lower the resolution further on its own, down to half of render_scale (never below 0.35), once ambient occlusion and bloom are already off, and climbs back when frames are fast again. On a desktop it gives up a step that did not help; a phone or tablet keeps it and tries the next. Each device starts a game where it last settled. Turn it on for a game played mostly on phones. Send only the keys to change; null restores the defaults, which render a scene exactly as before. An open editor updates live.
gravityThe world gravity vector in m/s², as {x, y, z}. Send only the axes to change; null restores Earth (0, -9.81, 0). An open editor updates live, including a running simulation.
player_controlsThe player input overlay — movement and look sticks, joystick layout and mode, handedness, jump, primary fire, and up to six authored action buttons, each with up to four desktop keys, up to two gamepad_buttons (standard-mapping names such as South, RightTrigger or DpadUp; Start is reserved for pause), and a touch_display of button (the default), menu (in hold-and-drag radial quick access) or hidden (no touch control). pointer_lock (also accepted as desktop_mouse_look) captures the mouse on click so it drives look input; it is off by default, and a first-person scene needs it to be playable with a mouse. Only enabled and mobile_controls_enabled are required. A sticks or buttons list you leave out keeps the scene's current one, so a call that only flips enabled keeps the authored buttons; send [] to remove a list. Sending a legacy key that a list replaces (for example jump_enabled) rebuilds that part of the overlay from the legacy keys and drops the stored list. A movement stick in sticks sets mobile_layout, joystick_mode and handedness, and buttons sets jump_enabled, primary_fire_enabled and primary_fire_label; those legacy keys are then ignored if sent, and the response lists any it overruled under warnings. Without the arrays the legacy keys still work, and any you leave out keep the scene's current value, as pointer_lock does. When you send buttons, jump and primary fire are turned on only if the list includes a jump or primary_fire button. See Player input and touch controls.

Touch actions use responsive docks: narrow containers show up to three persistent buttons, wider containers up to five when space permits, in authored priority order. Extras join quick access automatically. Persistent actions are 56 px with translucent backgrounds; the hub is 48 px and radial choices are 64 px. Hold the hub and drag onto a choice to hold that action; leaving or lifting releases it, and an un-dragged tap activates nothing. Keep simultaneous or continuously held actions persistent. position is a dock preference and never puts an action over a stick. See Player input and touch controls for the keyboard fallback and compact HUD authoring guidance.

Deleting a scene

scenes_delete soft-deletes: the scene's objects are kept so it can be restored, but it stops appearing in scenes_list and can no longer be loaded.

A project's initial scene is refused. Make another scene the start scene first — a project with no entry point cannot be played, so there is no state in which deleting the last way in is the right thing to do. scenes_list marks the current one with is_initial. A scene chosen as the project's menu scene or as its multiplayer start scene is refused too, until Game startup (or multiplayer_start_scene_id) points elsewhere. Move the start to an existing scene with projects_update's solo_start_scene_id, use Set as Start in the editor's scene list, or create the replacement with scenes_create and set_as_initial: true.

Running a physics simulation

physics_run_simulation runs the scene in an open editor tab with the real physics engine and its scripts, applies an input_sequence of input-bus changes, samples the objects you name, and restores the scene afterwards. In a visible editor, duration_ms, each input's at_ms and each sample's elapsed_ms are wall-clock time. Physics advances on each rendered frame in steps of at most 1/30 s: one step at 30 fps or better, several for a slower frame, up to half a second of physics per frame. When frames stop or slow, as they do in a covered window or a browser driven by automation, and simulated time falls 100 ms behind, the editor steps the physics itself at a fixed 60 Hz until it is level with the wall clock again. While it does, inputs and samples are scheduled by the time the physics has stepped, so at time scale 1 an input lands at its at_ms of physics time. A hidden or throttled tab is not paced by the wall clock at all; see Hidden and throttled tabs below. The result reports what was actually simulated: simulated_duration_ms, step_count, simulated_ms on each sample, fallback_step_count, the number of those fixed steps the editor took itself (0 when the tab's own frames kept up), and pacing, "wall_clock" or "unpaced". When simulated time still falls below 75% of the time the run was meant to cover, and at least 100 ms behind, it adds an entry to warnings: the editor could not keep up or was paused, so read simulated_ms rather than elapsed_ms, or keep the tab in front and retry. The inputs include crouch, moveSprint and authored actions as well as movement, look, jump and primary fire. An action press (an actions entry, jump, primaryFire or crouch going from false to true) is latched like a player's quick tap: it stays held until one physics step has run every script's update() with it, and only then can its release land, so a pulse shorter than a step is still seen by exactly one update in a slow or throttled tab. A held action still reads true on every step it is held. A top-level jump, primaryFire or crouch also sets actions.jump, actions.primary_fire or actions.crouch, as a player's keys do. The result's action_presses lists up to 50 presses, each with action, at_ms, applied_elapsed_ms and applied_simulated_ms (when it was applied), and observed_step and observed_simulated_ms (the first step whose scripts saw it, and the physics time at the end of that step; null if the run ended first). Sending true again for an action that is already held is not a new press. Each run starts from the authored camera heading: look input from an earlier run, whether lookAxisX/lookAxisY or pointer look, does not carry over. Each run also starts every object script afresh: the whole script runs again before init(), so a top-level local starts at its initial value rather than where the previous run left it.

Variables, GUI text and script logs. Each sampled GUI element carries gui_visible (its own opacity is above 0; a parent's is not considered), and a guiLabel or guiButton also carries gui_text, the text the last setText left, up to 500 characters. Three options add more and are off unless you ask for them. variable_names (up to 10 object variable names) reads those variables on every observed object at each sample, as samples[].objects[].variables, with the values getVar would return: an object_ref comes back as {object_id, name}, a string is truncated at 200 characters, and an unset name is null. scene_variable_names (up to 10) does the same for scene variables, as samples[].scene_variables. Each list takes names of 1 to 64 characters, and duplicates are dropped. capture_logs: true returns the scripts' print() output and errors in logs. Each entry has elapsed_ms, simulated_ms, kind (print or error), source, object_id and object_name, an error's phase, and message, truncated at 500 characters. An error that repeats is logged once, while script_errors still counts every occurrence. The log keeps at most 200 entries; past that the result has logs_truncated: true and logs_dropped, the number left out.

Bots. An object whose botBrain is set is played by its brain throughout the run, never by input_sequence, and the input sequence never reaches it; the scene script's onBotThink runs for a "script" bot. So one run can drive the player's character from input_sequence while NPCs play themselves, and scene_variable_names can record what a scene script's onBotThink saw. Room-only Lua still does not run here.

Hidden and throttled tabs. A hidden tab (a background tab or window, or an automation browser that reports the page as hidden), or one whose timers the browser is throttling, runs the simulation unpaced: the editor steps duration_ms of physics in fixed 1/60 s steps as fast as the tab allows, and schedules inputs and samples by that stepped clock. The tab therefore does not need to be visible. The result says pacing: "unpaced"; each sample's elapsed_ms and each press's applied_elapsed_ms are then milliseconds of stepped time, not wall-clock time, and actual_duration_ms (the wall-clock time the run took) can be shorter or longer than duration_ms. In any tab, a frame that covers no time never runs a script's update() and never uses up a latched press. A hidden tab claims a run at once, but the server holds that claim for up to 1.5 seconds after the request, so a visible editor with the same scene open can still take the run.

Time scale. A scene script that calls scene.setTimeScale changes how much physics time each wall-clock millisecond simulates: 0.5 is half speed and 0 freezes the world. The run still lasts duration_ms of wall-clock time (of stepped time when it is unpaced). simulated_duration_ms and each sample's simulated_ms report the physics time actually simulated, and stepped_duration_ms the wall-clock time the steps covered. The editor's own fallback steps, the scheduling of inputs and samples, and the throttling warning follow stepped time, so a run in slow motion is not reported as a slow tab. See Time scale and slow motion.

Limits. duration_ms is 100 to 120,000 (default 3,000) and sample_interval_ms 16 to 5,000 (default 100), with at most 625 samples a run (duration_ms / sample_interval_ms): a 60-second run needs sample_interval_ms of at least 96, a 120-second run at least 192. input_sequence takes up to 50 entries, each at_ms from 0 to duration_ms, and up to 20 objects can be observed. The variable readings a run asks for, samples × (objects × variable_names + scene_variable_names), may total at most 10,000; a run over that is refused, and the message says how to fit under it.

Long (soak) runs. A run of up to 10 seconds waits and returns its result. A longer run, or any run with background: true, is one continuous simulation that keeps going between calls, so bodies are never reset partway. physics_run_simulation returns a run_id as soon as an editor tab has picked the run up, or an error at once if none is open. Poll physics_simulation_status with that run_id: while status is running it reports progress (elapsed_ms, simulated_ms, step_count, sample_count), and once completed it returns the same simulation result as a short run, including the variables, scene_variables and logs the run asked for. A run whose result would be larger than 16 MB fails instead of being stored, and its error says how to make the result smaller. wait_ms (up to 10,000) lets one poll wait for the finish. Pass cancel: true to stop early: the run ends within about two seconds and its result carries cancelled: true with the samples taken until then. Keep the editor tab open for the whole run; a run whose tab is closed or reloaded expires about 20 seconds after it stops reporting.

Deadlines. Every run, short or long, reports progress to the server, and each report that shows more steps than the last pushes the run's deadline out to at least 20 seconds ahead, up to 5 minutes past duration_ms from the request. A run is therefore expired for going quiet, not for being slower than the wall clock. A run of up to 10 seconds still waits at most 45 seconds for its result, so it answers before a client's own request timeout.

Opening the editor in another browser

physics_run_simulation, scenes_take_screenshot, and scripting_run_editor_lua run inside an editor tab with the matching scene open. The screenshot and editor Lua tools want that tab visible; a simulation also runs in a hidden or background one. When the only such tab is in the background, or your client drives a browser that is not signed in (an automation profile, for example), call scenes_open_editor_link with account_id, project_id and scene_id. It returns an editor_url and its expires_at. Open the URL in a browser you control and keep that tab visible; those three tools then run in it.

  • It does not sign the browser in. The link's token goes with each request the page makes, and the page sets no cookies. Closing the tab, or letting the link expire, leaves the browser as signed out as it was.
  • It covers one project. The tab can reach that project and nothing else in the account.
  • It needs the full-access mcp scope, because the page is the full editor and can change the scene. A connection holding only granular scopes — even objects:write and every other editor scope together — does not see this tool, and a direct call fails; ask for a new authorization that includes mcp (changing the client registration alone does not upgrade a token already issued). Legacy full-access API tokens still work.
  • It lasts 60 minutes by default. Pass expires_in in minutes, up to 480. An open tab stops working when the link expires.
  • Do not reload the tab. The page removes the token from its address bar so other scripts never see it, so a reload goes to the sign-in page. Open editor_url again instead, or ask for a new link.

Treat editor_url as a credential: do not share it or write it to a log.

Scene objects

scene_objects_list, scene_objects_create, scene_objects_update, scene_objects_update_batch, scene_objects_delete, scene_objects_delete_batch, scene_objects_duplicate, and scene_objects_import. Use a stable idempotency_key when creating objects so a retry returns the original result instead of duplicating it.

scene_objects_list filters by name_prefix, exact object_type, exact tag, or a query matched against ID, name, and type, and returns at most limit objects (up to 1000; every match when omitted), with matched_count, returned_count, and truncated to say whether more matched. In a large scene, pass detail: "summary" to get only each object's ID, name, and type. scene_objects_delete_batch takes exact object_ids or the same name_prefix, object_type and query filters, matched the same way (it has no tag filter; to delete by tag, list by tag first and pass the ids). It needs at least one of them, and an ID given together with filters is deleted only if it also matches the filters. scene_objects_update merges the fields you send into the existing object, so send only what changes. Each object carries a lock_version that rises with every save. Pass the lock_version you read (from scene_objects_list or an earlier update) to scene_objects_update, or on an entry of scene_objects_update_batch, and a write that would overwrite someone else's change is refused with stale_object and the current_lock_version instead of being applied; in a batch the entry lands in errors with stale: true. Read the object again and resend. Without it the write always wins. A successful update returns the new lock_version.

scene_objects_create and scene_objects_update_batch check each entry on its own. The response lists what was applied (created_objects and reused_objects, or results) next to errors, one for each refused entry with its index, and the call fails with validation_error only when every entry was refused. Read errors even when ok is true. A new parent link is refused when the parent is a water object, or when it would join a GUI element and a 3D object, since GUI elements nest through parentObjectId. To move an object to the top level of the scene, send parent_id: null (an empty string also works). To detach an object's script, send scriptId: null (or "") through scene_objects_update or scene_objects_update_batch; the object then reads like one that never had a script. A property a nested object does not accept, such as a misspelt key inside multiplayer, is refused with its path, a suggestion and the properties accepted there; see Connect an MCP client. Deleting an object keeps its children, which become top-level objects. Changing an object's type, for example from empty to cube, rebuilds it in an open editor as the new type, and its children stay attached.

String values are stored exactly as decoded from the call's JSON, at any nesting depth, including the nested updates of scene_objects_update_batch. Send a line break as the JSON escape \n, not \\n, which stores a literal backslash and n.

A child's position and quaternion are local to its parent, in the parent's position, rotation and scale; a root object's are world-space. spatial_convert_point turns a world point into a child's local one. A GUI element given parent_id is nested through parentObjectId instead, with the same checks: the parent must be a guiPanel in the same scene, and a parent_id and parentObjectId that name different objects are refused.

scene_objects_duplicate copies an existing object and everything under it (children, a panel's GUI contents, scripts, variables and materials) as many times as you ask, so a repeated group is built once and copied rather than sent again as full JSON. It takes object_id, the root of the subtree, and copies, a list of 1 to 100 entries; an empty entry makes a copy in the original's place. Each entry can give that copy's root a position, quaternion, scale and name, in the same frame as the original root's stored transform (parent-local when it has a parent), and overrides, sparse fields checked and deep-merged the way scene_objects_update merges them. Descendants keep their offsets from the root. Overrides cannot set parent fields: pass parent_id to put every copy under another object (a guiPanel for a GUI element). A copy without a name is called "<name> (n)", as the editor's Duplicate names copies. Every copied object gets a fresh id. A parent link, object_ref variable, camera target, constraint body or path source that points inside the copied subtree points at the copy's own object; one that points outside it is kept. One call creates at most 2,000 objects and is refused if it would take the game past the 5,000 objects a game can publish with. The call is all or nothing, and it returns copies (each copy's index, root_id, name and object_count) and total_objects, not the objects themselves.

scene_objects_import: cross-project hierarchy copies. Copy one object and its children from another project in the same account into a destination scene. It takes ids of saved content, never inline object JSON: for that use scene_objects_create; for a copy inside one project, scene_objects_duplicate; for a reusable versioned copy, library_import. It creates independent object, material, script, shader and asset records with fresh IDs. Shared dependencies are copied once per import; materials bring their texture maps and shaders, and object bindings bring their assets, surface materials, scripts and animation assets. Asset records attach the same stored file bytes within the account. Later edits to either copy leave the other unchanged.

InputMeaning
account_idAccount shared by source and destination
project_id, scene_idDestination project ID and active scene UUID
source_project_id, source_scene_idDifferent source project in that account and its active scene
object_idSource subtree root UUID
positionOptional destination root position; otherwise keep its stored local position
include_id_mapsOptional boolean, default false; return full old-to-new object and resource maps, which can be large

The compact result contains root_id, total_objects and dependencies counts for materials, scripts, shaders and assets. With include_id_maps: true, it also includes id_maps for those resource types and objects. It returns no full object JSON. It requires both read and write scopes for every copied resource type: objects:read, objects:write, materials:read, materials:write, scripts:read, scripts:write, shaders:read, shaders:write, assets:read and assets:write. The legacy mcp scope also grants access. Only the destination receives the usual automatic checkpoint before an MCP write.

The imported root is detached from its original parent and keeps its stored local rotation and scale, as well as its stored local position unless overridden; descendants keep their local transforms. Parent links, object variables, camera targets, constraint bodies, path sources and waypoint paths inside the subtree follow the copied objects. Literal UUIDs in copied Lua, including comments, follow the object/resource maps; resource UUID literals add those dependencies transitively. Default white remains built in. Material name collisions gain a numbered suffix. Each call creates a new independent copy.

The operation is atomic and refuses cross-account imports, archived projects, deleted scenes, missing resources or asset files, links to objects outside the selected subtree, unknown UUIDs in copied scripts and multiplayer weapon bindings. Import a common parent containing the linked objects, or remove those links first. Closed source branches can be read; destination branch write policy still applies. One call creates at most 2,000 objects and 2,000 resource dependencies, within the destination game's publishing object limit. Game and scene settings, including weapon definitions and scene scripts, are not imported. Computed IDs and name-based Lua lookups are not parsed or adapted and need manual review. Direct imports create independent copies without tracking source versions. For reusable versioned snapshots, use the account library below. The editor assistant can save and import library revisions.

Every field you send must apply to the object's type. hasPhysics on a cube, for example, is refused with validation_error and a message naming the field and the types it does apply to (Fields do not apply to cube: hasPhysics (hasPhysics applies to camera)), instead of being saved and ignored. Only the fields a request sends are checked, so an object that already stores such a field still saves. On a type change, the fields sent are checked against the new type. To make a cube, sphere, cylinder or capsule visual-only, with no collider, send collisionType: "none"; that is the only collisionType a primitive accepts. A primitive with motion: "rig" is visual-only as well and has no collider; send motion: "dynamic" for one that should fall or be pushed. The reverse, an invisible collider, is visible: false on a cube, sphere, cylinder, capsule or mesh: it still collides, fires triggers and stops raycasts, but Preview and published games do not draw it and it casts no shadow, while the editor draws a hidden primitive as an orange wireframe. castsShadow now applies to a cube, sphere, cylinder or capsule as well as a mesh, character, ragdoll or vehicle; a primitive whose material is transparent with opacity 0 casts no shadow either way. See Physics, collisions, and triggers.

A guiLabel or guiButton takes optional text styling: fontWeight (a whole number from 100 to 900; absent is 400), italic, textAlign (left, center or right; absent is left on a label and center on a button), letterSpacing (-20 to 100 px), textOutline as {color: {r, g, b}, width} with width 0 to 20 px drawn outside the glyph, and textShadow as {color: {r, g, b, a}, offsetX, offsetY, blur} with offsets -50 to 50 px and blur 0 to 50. Other types refuse them. An update merges into what is stored and cannot delete a field, so take an outline or shadow off by sending textOutline.width 0 or textShadow.color.a 0. An outline or a shadow keeps HUD text readable over the 3D scene.

Sliders. guiSlider needs nothing beyond the core fields. Everything else defaults: min 0, max 1, value 0, 200 × 24 pixels, and a dark track with a blue fill and a white thumb. Its fields are min, max (must be above min, or the write is refused), value (the starting value, clamped into the range), step (absent or 0 is continuous), orientation ("horizontal" or "vertical"), backgroundColor (the track), fillColor, thumbColor, borderRadius, opacity, zIndex, ariaLabel (name the value it sets) and the GUI layout fields. It has no text: put a guiLabel beside it, for example both in a guiPanel with layoutMode: "row". Attach a script with onValueChanged(value, final) to react to the player.

Progress bars. guiProgressBar is a read-only bar for health, stamina or loading: value is the filled fraction from 0 to 1 (default 0), fillDirection is ltr (the default), rtl, btt or ttb, fillColor is the filled part and backgroundColor the rest of the track, and it defaults to 200 × 20 pixels with a borderRadius of 4. It needs nothing beyond the core fields. A script moves it with setValue and reads it with getValue; it never fires onValueChanged. Like every GUI element it is presentation in a room.

ariaLabel (guiButton, guiImage, guiPanel, guiSlider and guiProgressBar; a string of up to 200 characters) is what a screen reader announces. Set it on every guiButton whose text is empty, such as an invisible hotspot over part of an image or a dial segment, or is only a symbol ("X", an arrow); a textless button without one is announced by its object name. On a guiImage it is the alt text, and absent means the object name. On a guiPanel it announces the panel as a named group, such as "Pause menu"; absent, the panel is not announced. A script can change it during a run with setAriaLabel.

A particleEmitter draws smoke, exhaust, dust, sparks, fire or an explosion while the game runs; it has no collider, its motion is always static, and a create needs no field beyond its type. Its fields, with their defaults: emissionRate (particles per second, 0 to 1000, default 20), burstCount (0 to 2000, default 0, emitted at the start of the run), maxParticles (1 to 2000, default 200), lifetimeMin/lifetimeMax (0.01 to 30 s, default 1 and 2), speedMin/speedMax (0 to 100 m/s, default 0.5 and 1.5), direction (in the emitter's own frame, default up), spreadAngle (the cone's half-angle, 0 to 180°, default 20), gravityFactor (default 0; negative rises), drag (0 to 20, default 0.5), sizeStart/sizeEnd (diameter in metres, 0 to 50, default 0.3 and 1.2), colorStart/colorEnd (default light to mid grey), opacityStart/opacityEnd (default 0.6 and 0), blending (normal, the default, or additive), textureAssetId (an image asset in the project; absent draws a soft round puff), emitting (default true), simulationSpace (world, the default, or local), emitterShape (point, the default, sphere or box), emitterRadius (default 0.25) and emitterExtent (default 0.5 each way). lifetimeMin greater than lifetimeMax, or speedMin greater than speedMax, is refused, including when an update sends only one of the pair. In a multiplayer room an emitter is always presentation, so it cannot take scriptRole: "authority" or replicate. See Assets, materials, and shaders.

motion is dynamic, static or kinematic. A kinematic cube, sphere, cylinder, capsule or mesh is moved only by its script's moveKinematic, which is how to build a moving platform, lift or door; other types refuse kinematic. See Kinematic bodies and moving platforms.

motionQuality is discrete (the default) or linearCast, which turns on continuous collision detection so a small, fast body cannot pass through a thin wall between physics steps. Use it on balls, thrown props and projectiles. See Fast bodies and continuous collision.

On a dynamic cube, sphere, cylinder, capsule or mesh, linearDamping and angularDamping (0 or more) are the share of its speed and spin the body loses per second, applied inside every physics step, and maxAngularVelocity (greater than 0, in radians per second) caps its spin. Leave them out for the physics engine's defaults: 0.05, 0.05 and about 47.1. On a soft body, a flat linearDamping is the older spelling of soft.linearDamping, which wins when both are set. A water object's linearDrag and angularDrag are something else: drag the water applies to what floats in it, not a body's own damping.

A create only has to carry the fields you want to differ from the editor's own defaults. Presentational, tuning and generator settings are filled in server-side when omitted, with the values the editor itself uses for a new object: a GUI element's padding, opacity and borderRadius; a height field's terrain and noise settings; a character's collider, movement and animation settings (a 1.5-unit capsule, walkSpeed 4, runSpeed 8, jumpSpeed 6, mass 70, and showCollisionShape true, which draws a green wireframe of the capsule round the model in the editor only; send false to hide it); a light's color and intensity; a camera's cameraType ("perspective"); water's buoyancy, drag and flow; and a cloth's segments and pinning. An explicitly supplied value always wins, including a falsy one.

A directionalLight or pointLight sent without castShadow casts shadows. A shadow-casting point light renders the scene six times per frame into a cube shadow map, 512 pixels per side unless shadowMapSize says otherwise, so send castShadow: false on point lights that do not need shadows.

Colours on scene objects are in one of two spaces. A light's color and a hemisphere light's groundColor, and a vehicle's tireColor, rimColor and trackColor, are linear RGB like material colours (see Project resources for the conversion). GUI colours (textColor, backgroundColor, hoverBackgroundColor, borderColor, and the textOutline and textShadow colours) and a particle emitter's colorStart and colorEnd are sRGB as in CSS: a hex code's channels divided by 255. All of these take only the {r, g, b} object, not a hex string.

What stays required is what only you can choose: a shape's dimensions (a cube's or water's extent, a sphere's radius, a cylinder's or capsule's radius and halfHeight, a cloth's width and depth), asset bindings (a mesh's or ragdoll's meshAssetId, a GUI image's imageAssetId), a mesh's collisionType, a constraint's constraintType and a ragdoll's mode. The scene_objects_create description lists them per type, so a client can read them before its first call.

bodyAOffset and bodyBOffset (hinge, point, swingTwist, slider, sixDOF and cone; {x, y, z}) are usually best left out: place the constraint object exactly at the joint, and both bodies attach there. An offset is measured from the constraint object's world position, not from the body's centre. When the run starts, body A attaches at constraint position + (body A's rotation × bodyAOffset), and body B likewise. The constraint's own rotation and the body's scale do not apply. The joint then holds the two attachment points together, so any difference between them is a gap it closes by pulling the bodies together at the start of the run. A slider keeps the part along its axis as its starting travel. Fixed, distance, pulley and path constraints ignore both offsets.

For example, a point joint at (0, 1.31, -5) links a torso centred at y 1.65 and a pelvis centred at y 1.17. With no offsets, both attach at y 1.31 and stay 0.48 apart. Entering the centre-to-joint vectors instead (bodyAOffset {y: -0.34}, bodyBOffset {y: 0.14}) attaches the torso at y 0.97 and the pelvis at y 1.45, and pulling those points together leaves the centres 0.96 apart, double the intended gap. See Constraint attachment points and offsets.

A path constraint (constraintType: "path") makes bodyBId ride a curve carried by bodyAId. The curve is either pathPoints, in the constraint object's local space, or pathSourceId, a mesh made by assets_generate_track, whose road centreline replaces the points. Put bodyB on the curve and leave pathFraction out, and it attaches where it sits. Its motor targets are metres along the curve and metres per second. See Path constraints.

A camera's built-in controller is set on the camera object. controlMode is free, first_person, first_person_absolute, or third_person, and the last three follow targetCharacterId. first_person_absolute takes its world yaw from the target once, then keeps look independent of the body's turning: use it when a control script sets the body's yaw from input.aimYaw. first_person adds look to the body's rotation. In both first-person modes hideFollowedObject (default true) hides the followed object and its visual children while that camera renders; set it to false to show the body. minPitch and maxPitch, in degrees from −90 to 90 with positive up, limit how far the built-in controller looks down and up. Without them first person allows about ±87°, and third person orbits ±60° around its authored boom. A camera with a script attached does not use the built-in controller, so none of these apply to it.

animationMarkers (character, mesh and ragdoll) names moments in the object's clips for a script's animation timeline: a list of up to 256 {"clip", "name", "time"} entries, with time in seconds from the start of the clip and no blank clip or name. An update replaces the whole list. A marker past the end of a clip whose length is recorded in discoveredAnimations is refused. A clip with no recorded length is accepted, and projects_publish_check then warns animation_clip_length_unknown until the scene is opened in the editor, which measures it; it also warns animation_marker_past_clip_end about markers past a clip's end. See Animation playback API.

Authored waypoint patrols

The existing scene_objects_create and scene_objects_update tools support a waypointPath object; there is no separate waypoint tool. Supply the usual object name, transforms, material, and motion: "static", plus waypoints: an ordered array of at most 256 stops. Each stop requires a local-space position: {x,y,z} and may include id, label, waitSeconds (0–3600; default 0), and eventName. Missing or duplicate point IDs are normalized on save. Paths have no physics body and are invisible in gameplay. Fewer than two stops may be saved but cannot run.

Assign a character or dynamic non-sensor rigid body with "navigationAgent": {"waypointPathId": "<path object ID>", "speed": 1.1, "traversal": "loop"}. Speed is positive, at most 100 m/s. Traversal is "once", "loop", or "pingPong"; all start at the nearest stop. Static bodies, soft bodies, visual-only objects, and triangle-mesh colliders cannot patrol. Send "navigationAgent": null on a sparse update to remove the assignment; an empty object does not clear it. A copied subtree remaps the assignment when its path is copied too; otherwise it keeps its reference to the original path.

Automatic patrols run on the authority in a room: use multiplayer.scriptRole: "authority" and replicate: true on scriptless bodies. Player-controlled objects do not automatically patrol. Explicit Lua movement cancels an automatic patrol for that run. For Lua control, waits, arrival events, and the distinction between navmesh-routed followWaypointPath and direct followPath, see Authored waypoint patrols.

Object tags

Any scene object may carry tags: an array of up to 16 unique lowercase labels, each 1–32 characters, starting with a letter and continuing with letters, digits, underscores or hyphens. Pass the full list to scene_objects_create or scene_objects_update; updates replace the list and [] clears it. The same validation applies to editor writes.

scene_objects_list accepts an optional exact tag filter, combined with its other filters within the requested scene. Full results include the authored tags; detail: "summary" remains id/name/type only. Tags survive duplication, checkpoints and publication. Lua reads them with getTags(), hasTag(tag) and getObjectsByTag(tag); see gameObject API reference.

Removing settings with scene_objects_update

scene_objects_update and scene_objects_update_batch deep-merge your updates into the object's stored data. Only the fields you send change. An empty nested object changes nothing: {"multiplayer": {}} leaves every multiplayer setting as it was.

To remove a multiplayer setting, send null:

  • {"multiplayer": {"scriptRole": null}} removes that one setting and keeps the others.
  • {"multiplayer": {"animation": {"walk": null}}} removes one key of a character's room animation and keeps the rest; removing its last key removes animation.
  • {"multiplayer": null} removes every multiplayer setting. The object then reads exactly like one that never had any.

Removing the last remaining setting removes the multiplayer field too. This works the same way in scene_objects_duplicate overrides. scriptId and parent_id already detach when given null or an empty string.

On scene_objects_create, leave multiplayer out rather than sending null; create refuses it.

NPCs: objects played by a bot

A character, wheeledVehicle or trackedVehicle takes a botBrain field: "wander", "roam", "script" or "idle". Its control script then reads that brain's input instead of the player's, which is how to make an NPC; it is the inspector's Played by setting. Leave it out for the player. On scene_objects_update, "botBrain": null hands the object back to the player. Other object types refuse the field. botSettings tunes how the wander and roam brains play it. Every key is optional and a missing one keeps its default: speed (how far the stick is pushed, 0.1 to 1, default 0.8), jumps and fires (false and it never presses that button), and, for roam, roamMin/roamMax (metres from home, 1 to 100, default 4 and 14). For example "botSettings": {"speed": 0.4, "fires": false, "roamMax": 6}. Unknown keys and out-of-range values are refused. An update merges into the settings already there: null for one key puts it back to its default, and "botSettings": null removes them all. vehicles_create_wheeled and vehicles_create_tracked take it as bot_brain, so a computer-driven car or tank is one call: the brain drives it through the vehicle's driving script, and an unknown brain is refused before anything is saved. A "script" bot is played by the scene script's onBotThink(bot, dt). projects_publish_check warns with unscripted_bot_object when a bot object has no control script (nothing reads its input, so it never moves) and with bot_object_without_scene_script when a Script bot's scene has no scene script. See Played by a bot.

Account library

Save reusable prefabs, assets, scripts, materials and shaders in one account and import a chosen immutable revision into a project as independent copies. Every import has fresh object/resource IDs; later saves never update existing copies. These tools operate on saved server source, not client-supplied bundle JSON. Start with accounts_list; all six take account_id.

ToolInputs and result
library_listOptional kind (prefab, asset, script, material or shader), query (name/description), exact tag, limit (1–100, default 50), and offset. Returns compact item/latest-revision summaries, total and next_offset.
library_getitem_id; optional numbered revision (latest by default), revision_offset and include_content. Returns the selected revision's counts/digest, 50 revision summaries per page and optional saved content. Standalone assets offer a retained-file download URL. Internal blob IDs are omitted.
library_saveproject_id, kind, source_id (object/resource UUID), name; prefab saves also need scene_id. Optional description and tags. Omit item_id for a new item; include it and the latest base_revision to save a new revision. Stale bases are refused. Returns item and saved-revision summaries. This reads source content and does not create a project checkpoint.
library_updateitem_id; optional name, description, tags. Changes catalog metadata without changing revision content or kind.
library_deleteitem_id. Removes the item and every revision. Imported copies remain.
library_importitem_id, destination project_id; optional revision (latest by default), scene_id (required for a prefab), root position and include_id_maps (default false). Returns root_id, library_item_id, library_revision, total_objects, dependency counts and optional ID maps. It takes the usual destination checkpoint; it returns no full scene or bundle payload.

Library reads need library:read; save, update and delete need library:write. Save additionally requires read scopes for objects, materials, scripts, shaders and assets. Import needs library:read plus write scopes for those five areas. Write does not imply read. See MCP setup for authorization.

Snapshots include all transitive dependencies and retain source files after regeneration or project deletion. Shared files count once toward account storage. A prefab root is detached and keeps its saved local transform. External object references, unknown Lua UUIDs, missing resources/files and multiplayer weapon bindings are refused. A standalone script cannot reference objects outside its bundle. Computed IDs, object-name lookups, actions and scene variables need manual review. Scenes, environment and game/combat settings are excluded. Maximum 2,000 objects and 2,000 dependencies per capture/import, within the destination game limit. Source and destination must belong to this account, and destination branch write policy applies.

Account library saves, metadata and deletion are outside project checkpoints and AI turn revert. Imported copies are normal project content. In the editor, a prefab import is one object Undo/Redo action that keeps copied resources; standalone-resource imports have no object-history action. See Editor basics for the library interface.

Project resources

assets_list gives each asset a path such as /rails/active_storage/.... Resolve it against the origin of your MCP endpoint (its scheme and host, not its /api path); it is a signed link that redirects to a temporary storage URL, so keep the asset id and ask for a fresh path rather than storing the redirected URL. A library asset's download_url works the same way.

  • Materials: materials_list, materials_create, materials_update, materials_delete. Create and update take the same colour and finish fields — specular, shininess, emissive, emissiveIntensity, reflectivity, roughness, metalness, clearcoat, clearcoatRoughness, ior, sheen, sheenRoughness — so a material can be finished in one call. Material colours (color, specular, emissive and sheen) are linear RGB, the renderer's working space, not sRGB, so values copied from CSS or a palette look washed out. Send each as {r, g, b} with linear channels from 0 to 1, or as an sRGB hex string such as "#38383d" ("#rgb" also works), which the server converts to linear the way three.js's Color.setHex does, to four decimals. To convert by hand, an sRGB channel c from 0 to 1 becomes c / 12.92 at or below 0.04045, and ((c + 0.055) / 1.055)2.4 above it. Any material except a shader can carry a colour map, mapId. Standard and physical materials can also carry normalMapId, roughnessMapId, metalnessMapId and aoMapId, each an image asset ID, with normalScale (-10 to 10, default 1) and aoMapIntensity (0 to 10, default 1); those six fields are refused with validation_error on a phong, basic or lambert material, which never renders them. textureRepeat and textureOffset ({x, y}) and textureRotation (degrees, counter-clockwise) tile every map on the material. On materials_update, an empty string for a map ID removes that map. Its updated_fields lists the logical fields you changed plus data, the container they live in; data is a compatibility detail, not a field you can send.
  • Assets: assets_list, assets_upload_from_url, assets_generate_height_map, assets_generate_bitmap, assets_generate_sky, assets_generate_sound, assets_generate_ai_texture, assets_get_ai_texture, assets_review_ai_texture, assets_generate_mesh, assets_generate_track, assets_get_generated_recipe, assets_create_upload_session, assets_get_upload_session, assets_initiate_direct_upload, assets_complete_direct_upload, assets_delete
  • Scripts: scripts_list, scripts_create, scripts_update, scripts_delete. None of them returns Lua source unless asked. scripts_list defaults to detail: "summary", which gives each script's id, name, description, byte_size and updated_at; detail: "full" adds its lua. scripts_update returns the same metadata, and scripts_create each script's id and name; pass return_source: true to either for the saved lua. To change part of a script, send scripts_update an edits list of {old_string, new_string} replacements instead of the whole source in lua (not both). They are applied in order, each to the result of the ones before it, and each old_string must match exactly once: if any matches zero or several times, the call fails with validation_error naming that edit's index and match count, and nothing is saved.
  • Shaders: shaders_list, shaders_create, shaders_update, shaders_delete

Uploading files

assets_upload_from_url imports a file that is already at a public http(s) URL. Pass filename when the URL path has no file extension. For a file on your own computer, which a chat client usually cannot read, call assets_create_upload_session: it returns an upload_url to open in a browser and upload from. The link lasts 60 minutes unless you set expires_in (up to 1440), and can be limited to certain file extensions or a max_files count. Afterwards, assets_get_upload_session lists what was uploaded and the asset IDs to bind.

A client that can run shell commands, such as Claude Code, can upload a local file itself in two steps. assets_initiate_direct_upload takes the file's filename, its exact byte_size and a base64 MD5 checksum (openssl md5 -binary FILE | base64). It returns a signed_id, an upload URL with the headers the PUT must carry, and a ready-made curl command. The upload URL lasts 5 minutes. Once the PUT succeeds, call assets_complete_direct_upload with the signed_id, and optionally a name, to create the asset. Complete it before complete_by, 24 hours after starting: from then on the unattached upload is eligible for the daily cleanup, which purges it asynchronously, so the file may survive a little past the deadline but cannot be relied on. The PUT goes to a storage host that is not the MCP host, so your client (or whoever runs the command) needs outbound access to it; a proxy that allows the MCP call but blocks the PUT makes assets_complete_direct_upload report that no file has arrived — that is not a storage outage; use an upload session or assets_upload_from_url instead. The curl command is shell-escaped; keep it as given, or build the request from upload.headers and upload.url without interpolating them unquoted. Direct upload also takes fonts (.ttf, .otf, .woff, .woff2). Completing before the file has arrived returns validation_error, so finish the PUT first. Calling it again with the same signed_id returns the asset already created, with created: false, rather than a duplicate. If the account is at its storage limit, completing returns validation_error but keeps the uploaded file until complete_by, so free space (for example with assets_delete) and call it again with the same signed_id rather than uploading again. Both tools need assets:write and accept the same file types and size limit as the other upload paths. A chat client with no shell should use assets_upload_from_url or an upload session instead.

Model sizes

Models keep the units they were exported in, so a car from a centimetre-based tool can arrive 400 units long. The server measures every GLB, glTF and FBX mesh asset the same way the editor does when it loads one, and assets_list reports the result as bounds: {size: {x, y, z}, center: {x, y, z}} in the model's own units. Use it to choose a meshScale before placing the model. bounds_status says where the measurement stands. pending means a new upload has not been read yet, which usually takes a few seconds. ready means bounds is set. empty means the file holds no triangles, as with an animation-only FBX. failed means the file could not be read. Other assets, such as images and sounds, have no status. Generated meshes and tracks have bounds as soon as they are created.

meshScale on a character, mesh, ragdoll or vehicle multiplies the model after the importer's own unit correction, which converts an FBX from centimetres to metres first. The same value therefore means the same thing for FBX, GLB and OBJ: 1 draws the model at its meshSourceSize, so a Mixamo character is life size, and leaving meshScale out means 1. Before 16 October 2026 the editor drew an FBX at meshScale 1 a hundred times too large, so 0.01 was the usual workaround; existing FBX objects with a meshScale of 0.1 or less on every axis were multiplied by 100 to keep their size. Republish a published game to pick up the change.

Editing a shader

shaders_update takes the fields you are changing — name, shaderType, or glsl. Editing the source of a shader that a material already references re-renders every object using that material; there is no need to recreate the material to pick up new source.

Deleting a resource, and what it leaves behind

Deletion never cascades into scene objects, so each of these leaves a specific kind of dangling reference. None of them refuses on account of one: the delete goes through, and the response names what it has just left dangling in referenced_by (at most 25 of them), with reference_count for how many there were in all. Read that back, or repoint before deleting:

  • materials_delete — objects bound to the material fall back to the default white material. A surface binding on a mesh keeps the binding and shows as a missing material, which means pointing it at a replacement is a single edit rather than a rebuild.
  • shaders_delete — a material still referencing it through vertexShaderId or fragmentShaderId will not render at all. Repoint or delete those materials too.
  • assets_delete — objects bound through meshAssetId, heightMapAssetId, colorMapAssetId, imageAssetId, hoverImageAssetId, fontAssetId, or an animationAssets entry, and materials bound through mapId or one of the PBR map IDs, keep the now-dangling binding. A mesh whose asset is gone does not appear at all, and a height field falls back to generated noise without saying so. Deleting a generated mesh, track, bitmap, sky or sound also discards the stored recipe, so assets_get_generated_recipe can no longer return it and the asset cannot be rebuilt by amending what it was made from.
  • scripts_delete — does not report referenced_by. Objects the script was attached to, and a scene whose scene_script_id named it, keep the deleted ID. Before deleting, find those objects with scene_objects_list and detach it from the scene with scenes_update.

Procedural bitmaps

assets_generate_bitmap creates a PNG image asset from a layer recipe for a material texture, GUI image or particle sprite. It requires assets:write and takes account_id, project_id, name and recipe. Pass an existing generated bitmap's asset_id to rebuild it in place; uploaded images and other kinds of generated assets cannot be overwritten with this tool.

A recipe has version: 1, width and height (integers 1–1024, default 256), seed (0–2147483647, default 0), background (default transparent), seamless (default false) and 1–16 layers, ordered bottom to top. Colours are #RRGGBB or #RRGGBBAA. Every layer has a kind, color (default white), color2 (default black), opacity (0–1, default 1) and blend (over, multiply or screen, default over).

Layer kindControls
solidFills with color.
gradientFrom color to color2 along axis, x or y (default x).
checkerAlternating squares; cell_size in pixels.
stripescell_size is the full two-colour period; axis is x or y.
gridcell_size and line thickness (default 2 pixels, at most cell size).
dotscell_size, radius (default 6 pixels, at most half cell size) and softness (default 0, at most radius).
perlin, worleySeeded noise with cell_size; low values map to color2, high values to color. Each layer offsets the recipe seed by its position in the list.
rectangleTop-left x/y (default 0.25), width/height (default 0.5), as fractions of the canvas.
circle, ringCentre x/y (default 0.5), radius (default 0.4, at most 1) and softness (default 0). Radius and softness are fractions of the shorter canvas dimension. Rings also have thickness (default 0.1, at most radius); circle softness is at most radius, ring softness at most half thickness.

cell_size is an integer 2–256, default 32. Shape positions are 0–1; rectangle dimensions are greater than 0 and at most 1. Standalone shapes leave their exterior transparent and use only color. Soft edges fade inward. Only geometry fields belonging to the selected kind are accepted.

seamless: true accepts solid layers and repeating patterns or noise. Both dimensions must contain complete periods: twice cell_size for checkers, cell_size for the other patterns and noise. Gradients and standalone shapes are refused. Use a seamless recipe when repeating the image across a material's UVs.

{
  "account_id": "acct_...",
  "project_id": "prj_...",
  "name": "Checker floor",
  "recipe": {
    "width": 256, "height": 256, "seamless": true,
    "layers": [
      { "kind": "checker", "cell_size": 32, "color": "#404040", "color2": "#202020" }
    ]
  }
}

The response includes the asset, dimensions, byte size, resolved recipe, created flag and an image preview up to 256 pixels on its longest side. The suggested bindings are alternatives: mapId belongs on a material, imageAssetId on a GUI image, and textureAssetId on a particle emitter. Enable material transparency when its colour map should show transparent pixels. Fetch the saved recipe with assets_get_generated_recipe (assets:read), amend it and pass it with the same bitmap asset_id to keep existing bindings.

Procedural skies

assets_generate_sky creates an equirectangular PNG sky panorama, twice as wide as it is tall, from a layer recipe. It requires assets:write and takes account_id, project_id, name and recipe. Pass a scene_id to also make the sky that scene's skybox, keeping any rotation and brightness it already has; that also requires scenes:write. Without one, only the asset is created, and you can apply it later with scenes_update's skybox. Pass an existing generated sky's asset_id to rebuild it in place; other assets cannot be overwritten with this tool.

A recipe has version: 1, width (512, 1024, 2048 or 4096, default 2048; the height is half), seed (0–2147483647, default 0) and 1–12 layers, drawn bottom to top. Start with a gradient so every direction has a colour. Positions are in sky coordinates, not pixels: elevation is degrees above the horizon (-90 straight down, 90 overhead) and azimuth is the same compass angle as the sky setting's sun, so a sun layer and the procedural sun with the same angles sit in the same place. Every layer has a kind and opacity (0–1, default 1), and accepts only the fields of its kind. Colours are #RRGGBB or #RRGGBBAA.

Layer kindControls
gradientstops: 1–8 {elevation, color} pairs, interpolated between and held beyond the first and last. Include a stop below 0 for the ground the horizon fades into.
sunA disc with a halo; also a moon. azimuth (default 180), elevation (default 20), size (angular diameter in degrees, default 1.5), color, glow (halo radius in degrees, 0 for none, default 12), glow_color and glow_strength (0–1, default 0.5).
starsSeeded points spread evenly over the sphere: density (0–1; 1 is about 20,000 stars, default 0.4), brightness (0–1, default 1), color and min_elevation (default 0), below which they fade out over 10°.
cloudsSeeded noise on a flat layer overhead, so clouds shrink toward the horizon: coverage (0.2 scattered, 0.5 broken, 0.9 overcast; default 0.5), size (0.1–4, default 1), softness (0 crisp to 1 wispy, default 0.3), color for lit edges, shade_color for dense centres and min_elevation (default 2).
mountainsA seeded silhouette around the horizon that joins seamlessly at azimuth 0/360: height (tallest peak in degrees above base, default 8), base (-20 to 30, default 0), roughness (0 rolling hills to 1 jagged peaks, default 0.5), color at the ridge and base_color at the foot (defaults to color; a paler, bluer base reads as distance).
{
  "account_id": "acct_...",
  "project_id": "prj_...",
  "scene_id": "...",
  "name": "Dusk",
  "recipe": {
    "layers": [
      { "kind": "gradient", "stops": [
        { "elevation": -10, "color": "#2a2630" },
        { "elevation": 0, "color": "#f2a36b" },
        { "elevation": 40, "color": "#3b4f86" }
      ] },
      { "kind": "sun", "azimuth": 250, "elevation": 4, "size": 2 },
      { "kind": "clouds", "coverage": 0.35 },
      { "kind": "mountains", "height": 6, "color": "#2b2f3c", "base_color": "#6a6f86" }
    ]
  }
}

The response includes the asset, dimensions, resolved recipe, created flag, the scene's resulting skybox (or null when no scene_id was given), a skybox binding and a preview image. Fetch the saved recipe with assets_get_generated_recipe, amend it and pass it with the same asset_id to change the sky without rebinding it.

Procedural sounds

assets_generate_sound creates a sound effect: a 16-bit mono WAV, at most 4 seconds long, mixed from oscillator voices in the spirit of sfxr. It requires assets:write and takes account_id, project_id, name and either a preset or a recipe, not both. Pass an existing generated sound's asset_id to rebuild it in place; other assets cannot be overwritten with this tool. Scripts play the result by its asset ID with playSound (see the gameObject API); nothing needs binding.

A preset — coin, laser, explosion, powerup, hit, jump or blip — is a starting point. seed (default 0) picks a variation of it, and the same preset and seed always give the same sound. A preset expands into an ordinary recipe, and that recipe is what is stored and returned, so a preset sound can then be revised field by field. seed is refused alongside a recipe, which has its own.

A recipe has version: 1, sample_rate (44100, the default, or 22050, which halves the file and suits retro sounds), seed (seeds noise voices, default 0), volume (master level 0–1, default 0.8), echo_delay (seconds between echoes, 0–1, default 0 for none), echo_feedback (each echo's level relative to the last, 0–0.9, default 0.35) and 1–8 voices, which are mixed together. The sound lasts until its last voice ends, plus the echo until it fades below 1%, up to 4 seconds. Each voice accepts:

FieldMeaning
wavesquare (the default; chiptune), sine (pure), saw (bright, buzzy), triangle (soft) or noise (seeded; its frequency sets how coarse it sounds, so a low one rumbles for explosions and a high one hisses).
start, attack, sustain, decaySeconds. The voice begins start into the clip (default 0), rises from silence over attack (default 0, at most 2), holds for sustain (default 0.1) and fades out over decay (default 0.2). A voice whose three lengths add up to nothing is refused, as is one that ends after 4 seconds.
punch0–1, default 0: extra level at the start of the sustain that falls back by its end, for the snap of hits and coins.
frequency, frequency_endStarting pitch in Hz (20–12000, default 440), and the pitch it slides to, evenly in octaves, by the end of the voice: lower for falls and lasers, higher for jumps and power-ups. Default no slide.
vibrato_depth, vibrato_rateDepth in semitones (0–12, default 0) and speed in Hz (0–40, default 6).
arpeggio, arpeggio_atA pitch multiplier (0.25–4, default 1 for none) applied from arpeggio_at seconds into the voice: 1.5 jumps a fifth and 2 an octave, the two-note coin chime.
duty, duty_endSquare waves only: the fraction of each cycle that is high (0.05–0.95, default 0.5; thinner toward 0.1), and the value it sweeps to.
low_pass, low_pass_end, resonanceA low-pass cutoff in Hz (50–20000; lower is more muffled), the cutoff it sweeps to in octaves (requires low_pass), and resonance (0–1, default 0), a peak at the cutoff that whistles as it sweeps. Default no filter.
high_passA cutoff in Hz (10–10000) below which sound is removed, making it thinner. Default none.
volumeThe voice's level in the mix, 0–1, default 0.5.
{
  "account_id": "acct_...",
  "project_id": "prj_...",
  "name": "Door slam",
  "recipe": {
    "voices": [
      { "wave": "noise", "frequency": 600, "frequency_end": 120, "sustain": 0.03, "decay": 0.25, "punch": 0.6, "low_pass": 2500 },
      { "wave": "sine", "frequency": 90, "frequency_end": 45, "sustain": 0.02, "decay": 0.3, "volume": 0.4 }
    ]
  }
}

The response includes the asset, duration, sample_rate, the resolved recipe, the created flag and a waveform image, which shows the envelope you cannot hear. peak is the loudest sample before clipping, where 1 is full scale, and clipped_samples counts samples that went past it. If that count is above 0, lower the recipe's volume or the voices' levels. Fetch the saved recipe with assets_get_generated_recipe, amend it and pass it with the same asset_id to change the sound without changing any script that plays it.

AI textures

assets_generate_ai_texture asks an image model for a tiling colour (albedo) texture from a text description. It is for realistic or painterly surfaces that a procedural bitmap cannot draw, such as weathered stone, bark or rusted metal. For patterns, noise and flat colours, use assets_generate_bitmap, which is free and instant. Nothing is added to the project until the texture is accepted, and an accepted texture is labelled AI-generated.

It requires assets:write and takes account_id, project_id, name (used for the texture, its asset and its material) and prompt, at most 1,000 characters. Describe only the surface: the server adds the instructions for tiling, flat lighting and framing. Optional fields:

FieldMeaning
modelopenai/gpt-image-2 (the default; best results, about 30 seconds), qwen/qwen-image-3 (cheaper, slightly less reliable, about 45 seconds) or black-forest-labs/flux-3-image-klein (fast, cheap drafts, about 5 seconds). The tool's schema lists the models currently offered.
seam_repairblend (the default) evens out the lighting and blends the edges so they wrap. delight only evens out the lighting, which suits strict grids such as bricks and tiles, where blending can double the grout lines. none keeps the image as the model drew it.
reference_asset_idsUp to 3 of the project's PNG, JPEG or WebP image assets, to guide colour and pattern. Black Forest Labs' terms let it train on reference images sent to FLUX models.
target{scene_id, object_id}: an object to apply the material to when the texture is accepted.

The request runs in the background and returns a generation_id with status: "pending". Poll assets_get_ai_texture (assets:read or assets:write) with it until the status is ready or failed; this usually takes 5–60 seconds. A ready texture comes back tiled 3×3 as an image, so seams show, with seam_score: 1.0 means the wrap edge looks like the rest of the image, and above about 1.5 a seam may be visible. Show the user the image before deciding. A failed request has an error, for example when the prompt is refused by content screening; it is not charged.

assets_review_ai_texture takes the generation_id and a decision, and only a ready texture can be reviewed:

  • accept creates an image asset labelled AI-generated and a standard material that uses it as its colour map (mapId). It applies the material to the target object when the request named one. It needs materials:write as well, and objects:write when there is a target. The response gives asset_id, material_id, applied and bindings.
  • reject discards the candidate.
  • regenerate discards it and opens a new request with the same settings, returned as a new generation_id to poll. The new request is charged and counted like the first.

Each request is charged to the account's AI allowance, then its credit, at the image model's price. Each account can make a limited number per day, 25 by default, counted in UTC days; failed requests do not count. Refusals use these error codes: disabled (AI textures are off for this plan), wallet_depleted (the allowance and credit are used up), daily_limit and invalid (for example an unknown model, scene, object or reference asset, more than 3 references, or a missing prompt). A candidate that is never reviewed is deleted after 7 days.

An accepted texture is an ordinary image asset: assets_list shows it with generator: "ai_texture", and it can be used in any material map. It cannot be rebuilt from a recipe. Generated images must not be used to train AI models or be presented as made by a person.

Height maps

A height map is created, never rebuilt: there is no asset_id to pass back, assets_list gives it no generator, and assets_get_generated_recipe refuses it. The response (and the asset's description) carries the complete numeric recipe, so keep it; to revise terrain, generate a new map from an amended recipe and point the height field's heightMapAssetId (and colorMapAssetId) at it.

assets_generate_height_map creates a deterministic grayscale PNG for a height field without an image model. It accepts a name plus structured controls for sample_count, seed, frequency, octaves, persistence, lacunarity, ridge_weight, island_weight, terrace_steps, and smoothing_passes. Pixel values from 0 through 255 map from the terrain base through its heightScale.

Set generate_color_map to true to also create a pixel-aligned RGB companion. color_palette accepts terrain, island, desert, or alpine. Apply the returned heightMapAssetId and colorMapAssetId bindings to the same height-field object so its geometry and visuals match.

The height-field object itself needs only what you want to set. sampleCount, terrainSize, heightScale, noiseSeed, noiseFrequency and noiseOctaves are all defaulted when omitted — so a height field built around an authored heightMapAssetId does not have to invent noise settings for a generator that is never going to run. The noise triple only describes how to synthesise heights; supplying a height map says they are already authored.

Generated meshes

assets_generate_mesh builds a GLB from either a tree of solids combined with Boolean operations or a high-level seeded rock recipe. assets_generate_track sweeps a road cross-section along a centreline, with optional curbs — striped red and white when you give curb_stripe_length, which alternates the curb between a curb and a curb_stripe material slot every that many metres — and painted lines, each an offset from the centreline and a width, in a line slot of the road surface. Both return an ordinary project asset you bind to a mesh object through meshAssetId.

The solids are box, sphere, cylinder, cone, capsule, torus, and wedge, plus three built from a 2D profile: extrude pushes a closed outline along its depth, with optional twist and top scale; revolve turns a [radius, y] outline around the vertical axis; and sweep carries an outline along a path of 3D points. Operations are union, difference, and intersection. The response includes a rendered preview image of the result, so check it for a hole in the wrong face before binding the asset.

One generated mesh can carry several materials. Any recipe node — a solid, an operation, an extrude, revolve or sweep — may name a material_slot. A node without one takes its parent's, and the root takes the recipe-level material_slot, which defaults to "surface". After the Boolean operations each face keeps the slot of the solid it came from, so the faces a difference cuts take the cutter's slot: to colour a window reveal like the wall, name the cutter walls, or leave it unnamed under a parent that is. A recipe may name up to 16 slots, each 1 to 64 characters. The response lists the slots that survived in geometry.material_slots, in the order the recipe first names them (a slot whose faces were all cut away is left out); it replaces the old bands key, and a rock's rock, top and ground are listed there too. When there are several, the preview tints each slot a different colour. Bind a project material to each slot on the mesh object with surfaceOverrides: [{"surface": "roof", "materialId": "..."}], as for a track's road and curb. A pit building with a red roof, white walls and three glazed window recesses:

{"root": {"op": "difference", "material_slot": "walls", "of": [
  {"op": "union", "of": [
    {"solid": "box", "size": [10, 4, 6], "at": [0, 2, 0]},
    {"solid": "box", "size": [11, 0.5, 7], "at": [0, 4.25, 0], "material_slot": "roof"}]},
  {"solid": "box", "size": [1.5, 1.5, 1], "at": [0, 2, 3], "material_slot": "glass",
   "repeat": {"count": [3, 1, 1], "step": [3, 0, 0], "from": [-3, 0, 0]}}]}}

A track is a list of straight and arc sections, with optional rise, banking, and width taper per section. Set close and mark three or more sections with adjust to have the circuit solved so it meets its start. For a road that wanders, give a path of control points instead of sections. Optional barriers add solid walls along either edge.

A track starts heading +Z. A positive arc angle turns toward -X, clockwise seen from above and a right turn for a driver; a negative one turns toward +X. Positive bank raises the road's +X edge (+X while heading +Z), which is a driver's left and the outside of a positive turn, and a barrier's "right" side is that same +X edge.

Seeded rock recipes

A rock recipe uses the same tool rather than a separate endpoint. Its kind is boulder, outcrop, arch, bridge, cliff_wall, or cliff_freestanding. The result stays inside its declared size, has a flat base, and exposes rock, top, and ground material slots. Reusing the seed reproduces the same geometry.

{
  "rock": {
    "kind": "arch",
    "size": [12, 7, 4],
    "seed": 2033752418,
    "detail": 2,
    "roughness": 0.45,
    "asymmetry": 0.4,
    "erosion": 0.3,
    "top_flatness": 0.15,
    "opening_width": 5,
    "opening_height": 4,
    "uv_mode": "atlas",
    "atlas_size": 2048
  }
}

For an arch or bridge, opening_width and opening_height are guaranteed gameplay clearance, not approximate decoration. detail accepts 0 through 3. roughness, asymmetry, erosion, and top_flatness accept 0 through 1; clustered formations can also set cluster_count from 2 through 12.

Leave collision out for an exact static triangle mesh, which is normally right for arches, bridges, and cliffs. Add "collision": {"decompose": true} at the recipe root for a movable boulder or outcrop. Read geometry.warnings: reaching the hull budget can make the collider more solid than the rendered model.

uv_mode: "tiling" is the default and uses uv_scale as metres per texture tile. uv_mode: "atlas" creates unique padded facet islands; atlas_size accepts 512, 1024, 2048, or 4096. The editor can reproduce and download the colour-coded UV guide from the stored recipe.

The recipe is stored with the asset. assets_generate_mesh and assets_generate_track do not send it back: their response carries recipe_omitted, a pointer to assets_get_generated_recipe, unless you pass return_recipe: true. assets_generate_bitmap, assets_generate_sky and assets_generate_sound include their resolved recipes. assets_list identifies generated meshes, tracks, bitmaps, skies and sounds. Call assets_get_generated_recipe for the complete saved recipe, amend it, then pass it with the same asset_id to the matching generator: assets_generate_mesh for a shape or rock, assets_generate_track for a track, assets_generate_bitmap for a bitmap, assets_generate_sky for a sky, or assets_generate_sound for a sound. Reusing the ID rebuilds the asset without breaking its bindings.

The same height-map, shape/rock, and track generators are available in the editor's Assets panel and produce identical assets — see Assets, materials, and shaders.

Specialized creation

soft_bodies_create, soft_bodies_update, vehicles_create_wheeled, and vehicles_create_tracked supply safe defaults for complex Jolt objects.

vehicles_create_wheeled takes a preset of car (the default), truck, buggy, race, or motorcycle, and an optional even num_wheels from 2 to 16. vehicles_create_tracked takes tank (the default), bulldozer, or apc, and an optional num_wheels_per_track from 2 to 12. Both accept a spawn position and a chassis mass, and attach a WASD driving script unless you pass your own Lua in script. Both return object_id, type, name, preset and script_id; the script has no name in the response, so look it up in scripts_list by that id, with detail: "full" for its source.

soft_bodies_create takes a type of softSphere, softCube, softCylinder, softCapsule, softMesh, or softCloth. Apart from cloth, each one persists as an ordinary shape carrying a soft block — a softCylinder is stored as a cylinder — so scene_objects_list reports the rigid type and you find soft bodies by the presence of soft, not by type. Rest dimensions stay on the shape itself, which is why a soft cylinder takes radius and half_height rather than repeating them inside the block.

Because of that, scene_objects_create and scene_objects_update can add or remove soft on an existing cube, sphere, cylinder, capsule, or mesh directly — the same switch the editor's inspector offers. A soft body is always dynamic and can be neither a trigger volume nor a compound parent; sending soft alongside isSensor, compoundChildren, or a non-dynamic motion is rejected. soft_bodies_update only accepts an object that is already a soft body.

Pushing one from a script uses the ordinary object API — addForce, addImpulse and addTorque all work on a soft body, and there is no applyImpulse on anything. Size the numbers by vertex count, not by the shape: a soft body's mass is the number of vertices it simulates, one kilogram each, and the object's mass field is ignored. A softSphere at the default tessellation builds 162 vertices and so weighs 162 kg, and raising segments_theta or segments_phi makes it heavier — so an impulse sized for a rigid body of the same dimensions moves it imperceptibly. addForce and addTorque are also per-frame, cleared by each step, while addImpulse is the one-shot. See Physics, collisions, and triggers.

Soft bodies are the costliest physics there is: each costs its vertices × iterations on every physics step while it is awake, and it stays awake while it moves or sits inside a trigger volume. Keep a scene to one or a few. For a ball, segments_phi 12 and segments_theta 8 (74 vertices, against 162 at the defaults of 20 and 10), iterations 4 or 5 and a bend_type of distance (the default) or none look the same as denser settings. Do not raise iterations or segments to make one look better, and do not place one in a trigger volume. projects_publish_check warns with soft_body_cost when a scene has too much; see "Checking a game before publishing" above.

Spatial planning and verification

Use spatial_inspect_scene, spatial_plan_layout, spatial_solve_relative_placement, spatial_check_clearance, and spatial_convert_point before guessing transforms. spatial_inspect_scene reports objects' local and world transforms, bounds, corners, and named world-space surfaces, such as a ramp's world_geometry.surfaces.top; pass detail: "summary" for only each object's identity (id, name, type, parent_id, bounds_quality), world position, quaternion and scale, and world_bounds (min, max, size). spatial_solve_relative_placement places a subject against a reference object with a requested clearance, spatial_check_clearance tests a proposed transform for bounding-box overlaps, and spatial_convert_point converts a point between an object's local space and world space through its parents. A mesh is sized by the bounding box the editor measured when it loaded the model, or, when no editor has loaded it yet (for example right after an upload), by the bounds the server measured for its asset. For a proposed mesh subject that is not in the scene yet, pass mesh_asset_id rather than guessing mesh_source_size or collision_extent. spatial_plan_layout hands a plain-language request to a read-only planning specialist; it spends the account's AI allowance (refused with wallet_depleted when that is used up), and its plan is the specialist's reply as given — when it is a string containing JSON, parse it once more. spatial_solve_relative_placement returns "" for a new subject's object_id and a root subject's parent_id: an absent reference, not an id. None of them changes the scene. physics_run_simulation runs the real scene in a matching editor tab (a hidden or background one included), samples selected objects, and restores the scene afterward. It runs for duration_ms (100 to 120,000, default 3,000; a run over 10,000 returns a run_id to poll with physics_simulation_status, see Running a physics simulation), samples at least one and up to 20 objects named in object_ids or object_names every sample_interval_ms (16 to 5,000, default 100, at most 625 samples a run, with the first sample one interval in), and applies an input_sequence of up to 50 timed input changes, each an at_ms plus the inputs to set: movement and look axes or keys, jump, primaryFire, authored actions, and actionValues — how far each action is held, 0 to 1, as a script reads input.actionValues from a gamepad trigger. An action set in actions without a value reads 1 when true and 0 when false. device (keyboard, gamepad or touch) and gamepadStyle (xbox, playstation, nintendo or generic) set what scripts read as input.device and input.gamepadStyle, to check a HUD that shows different prompts per device. Every run starts as keyboard with no gamepad style, so a script reads the same in every run, and the editor's own reading comes back afterwards. Any other value is refused with validation_error.

Vehicles are driven through the shared input bus in a simulation run — moveAxisY for throttle, moveAxisX for steering — because a vehicle's own script re-derives its driver input from that bus every frame. Vehicle samples report vehicle_wheel_contact, vehicle_driver_input and body_active, which is what tells a stationary vehicle with no throttle apart from one whose wheels are not touching the ground. A vehicle drops onto its suspension in the first fraction of a second, so early samples without contact are normal. Read the summary's wheels_ever_in_contact instead: a wheel that never touches the ground during the whole run points to a geometry or spawn-height problem. See Troubleshooting.

Object and scene Lua run during a simulation, and every error a script raises comes back in script_errors, with the script's label, the callback it was in, the message, and how many times it happened. Read that list first when a contact is recorded but nothing moved: a callback that ran and threw leaves exactly the same trace in the samples as a callback that never fired, and only script_errors tells the two apart.

Screenshots

scenes_take_screenshot captures an image from an open editor tab — either from a named scene camera (camera_id) or whatever the editor is currently showing. The matching project and scene must already be open and visible in an editor tab. Returns an image_url that expires after 24 hours.

The request waits 20 seconds. editor_unavailable means no editor claimed it — keep the scene frontmost, wait for it to finish loading, and retry once; a tab that was loading or reconnecting picks up a pending request when it is ready, and a hidden tab leaves it for a visible one. editor_timed_out means an editor claimed it but did not finish; check that tab. A viewport of zero size, or one whose canvas returns no image, fails with screenshot_failed — show and resize the viewport and retry. A nearly black image can be the correct result of a dark scene; compare with a normally lit scene before assuming a fault.

If the browser has dropped the tab's WebGL context, before or during the capture, the call fails with screenshot_failed and a message saying the WebGL context was lost, instead of returning a blank image. The browser usually restores the context once the tab is visible again, so retry then.

A capture through a scene camera leaves out the editor's helpers: light helpers, camera frustums and models, an empty's marker, trigger and hidden-collider stand-ins, constraint lines, and the selection outline and gizmo. Without camera_id the image is the editor's own view, helpers included.

Editor Lua

scripting_run_editor_lua runs a snippet of Lua inside an open editor tab and returns whatever that snippet returned, together with anything it passed to editor.log. It takes account_id, project_id, scene_id, code (1 to 50,000 characters), and an optional mode.

  • mode: "inspect" (the default) can read the scene but not change it — use it to answer questions about what is actually loaded.
  • mode: "apply" additionally allows editor.scene.create, update, and delete. Writes are refused while a simulation is running.

The two modes need different permissions. The tool is available to a client holding either objects:read or objects:write, because inspect cannot change anything; apply is checked separately and refuses with insufficient_scope unless the connection holds objects:write. A read-only client can therefore inspect a scene through this tool without being granted write access to it.

The code is ephemeral: it is never attached to an object and never stored as a project script. The editor API includes editor.scene.list, get, create, update, delete, editor.log, and navigation inspection through editor.navigation.bake():await(), stats(), show(), hide(), and findPath(from, to). It is documented under "Editor Lua REPL" in Editor basics and behaves identically here.

editor.scene.create(type, fields) takes the fields scene_objects_create accepts for that type, including ones the default object leaves out such as friction, restitution, parent_id and collisionType, and can make a mesh from a meshAssetId listed by assets_list. A field that does not apply to the type, a value out of bounds or one the editor would not keep, an unknown asset or parent, or an id raises a Lua error naming each problem, and that call creates nothing. get and list see objects created earlier in the same snippet, so a later line can parent to one. If a snippet fails partway, its error lists the ids of the objects it had already created, so a retry need not make them again. When a snippet finishes, the tool waits for its new objects to save and returns any the server refused in result.save_errors. update is unchanged: it writes only fields the object already has.

Like scenes_take_screenshot, this tool needs the matching project and scene already open in a visible editor tab. The request is offered to that tab and expires after 30 seconds. If no editor claims it in time the call fails with editor_unavailable; if an editor claimed it but did not finish, it fails with editor_timed_out, and in apply mode the snippet may still be running or may already have written changes, so inspect before retrying.

Support

support_contact files a request from a message and an optional context, such as error output. Its status is pending until support has been emailed, then sent; failed means it was not delivered, and resolved that support has closed it. support_list and support_get retrieve your own requests in that account. support_get returns one request in full, with its replies: the replies support has emailed you about it, oldest first, each with id, body and sent_at. support_list is a summary, newest first. By default each request's message and context are cut to their first 500 characters, with message_truncated or context_truncated set to true on a field that was cut, and each request carries reply_count and last_reply_at instead of its replies. Pass include_full_text: true or include_replies: true for the whole text or the replies. It returns 25 requests a page by default (limit, up to 100); pass the response's next_offset as offset for the next page, and next_offset is null on the last. A request marked resolved usually has a reply explaining why, so read it before filing again.

Pass project_id to support_contact when the request is about a project you are working in. The request is tagged with it and comes back with project (id and title); an untagged request has project: null. Pass the same project_id to support_list to see only that project's requests. An archived project, or one in another account, fails with not_found and nothing is filed.

Preview destructive queries

Before scene_objects_delete_batch, run the same filter through scene_objects_list and inspect the exact matches. The same care applies to scripting_run_editor_lua in apply mode: run the snippet in inspect mode first and read what it reports before letting it write.

The resource deletes — materials_delete, shaders_delete, assets_delete — do not cascade, but each reports what it left dangling in referenced_by — read it, and repoint what it names. scenes_delete is the gentler one: it soft-deletes and keeps the objects.