Kube.new

AI

All the tools we expose to the AI chat as it runs, if you're curious.

Reads

read_dirty_scripts_in_workspace

Read every script's text as it is in the editor right now, including edits the user has not saved yet, with optional TypeScript diagnostics.

FieldType
path_substring

string | null

include_text

boolean | null

include_diagnostics

boolean | null

only_files_with_diagnostics

boolean | null

read_all_script_warnings

Read TypeScript diagnostics for every script in the editor.

{}

read_script_raw_code

Read the stored raw code for one script object.

FieldType
object_id

number

ls

List direct children under in_object_id, with optional pagination and recursive child expansion up to depth levels.

FieldType
in_object_id

number

offset

number | null

limit

number | null

depth

number | null

ls_data

List referenced mesh, animation, and texture data ids in the world, with optional mode filtering and pagination.

FieldType
mode

DataMode | null

offset

number | null

limit

number | null

inspect

Inspect one object. Returns object summary data plus parent, children, incoming pointers, referenced data ids, optional script code, and info or physics fields based on mode.

FieldType
object_id

number

mode

inspect_data

Inspect cached mesh, animation, or texture data by data_id. Texture results are metadata-only in this text response, and uncached data returns a failure payload describing the referenced types.

FieldType
data_id

number

grep

Search objects by AND-ing all provided filters. Supports name, object_type, parent, pointer relationships, referenced data ids, and substring search over serialized object info.

FieldType
name

string | null

object_type

string | null

parent_id

number | null

object_id_that_points

number | null

has_data_id

number | null

object_info_string_contains

string | null

offset

number | null

limit

number | null

get_path

Get the parent path from the root object down to one object, with optional pagination over the path entries.

FieldType
object_id

number

offset

number | null

limit

number | null

get_game_settings

Get the current game title, description, max players, and visibility.

{}

get_placement_warnings

Get warnings about floating objects with no support below them.

{}

Writes

create_object

Create a world object from the JSON string in object. If parent_id is omitted, the object is created under the root.

FieldType
object

string

parent_id

number | null

add_default_material

Create a Material object from one built-in material name. The available material names are: wood_planks, grass, ice, checker_plate_metal, fabric, water_001, oak_veneer_01, metal_044_a, wood_table_001, metal_060_b. Returns the newly created material id.

FieldType
name

string

delete_object

Delete an object, recursively removing its children and clearing pointer links that point to it.

FieldType
object_id

number

copy_and_paste

Duplicate an object and its children under the same parent. offset moves the copied subtree in world space, and the copied root name is auto-suffixed with _Copy if clone_name is omitted.

FieldType
object_id

number

offset

Vec3Args | null

clone_name

string | null

edit_object

Edit one object at jspath using the JSON string in jsvalue. jspath can be a dot-separated path like a.b.c or a JSON-encoded array of path segments.

FieldType
object_id

number

jspath

string

jsvalue

string

A JSON string containing the value to write at jspath.

set_game_settings

Set one or more current game settings. Omitted fields are left unchanged. Setting visibility to Published only changes visibility; it does not save or publish the current editor world.

FieldType
title

string | null

description

string | null

max_players

number | null

visibility

publish

Publish the current world to the website, overriding the existing published game for all new servers that start. It has same behavior as the editor Publish button. This publishes the current version and captures its thumbnail. Call this only after all edits and checks are complete, and do not call it inside run_parallel.

{}

write_script_raw_code

Write raw code for one script object.

FieldType
object_id

number

script_raw_code

string

run_temporary_script

Run one temporary server script against the editor world, then remove the temporary Script object. Use this for short command-style edits that are easier in TypeScript than individual object tools. Returns console logs plus created, deleted, and modified object summaries.

FieldType
script

string

move_by_recursively

Move an object and its physical descendants by translation in world space.

FieldType
object_id

number

translation

move_to_recursively

Move an object and its physical descendants so the root object ends up at target_point. This fails if the root object has no direct physics position.

FieldType
object_id

number

target_point

scale_recursively

Scale an object and its physical descendants by scale_multiplier around center_point. If center_point is omitted, the tool uses the object's current physics position and fails if the object has no direct physics position.

FieldType
object_id

number

scale_multiplier

number

center_point

Vec3Args | null

rotate_recursively

Rotate an object and its physical descendants by rotation_magnitude radians around rotation_axis and center_point. If center_point is omitted, the tool uses the object's current physics position and fails if the object has no direct physics position.

FieldType
object_id

number

rotation_axis
rotation_magnitude

number

center_point

Vec3Args | null

create_brick

Create a brick from a center point, size, and optional XYZ rotation in degrees.

FieldType
parent_id

number

name

string

center
size
rotation_degrees

Vec3Args | null

color

Color3Args | null

opacity

number | null

create_box_between_corners

Create an axis-aligned brick from two opposite corners.

FieldType
parent_id

number

name

string

corner_a
corner_b
color

Color3Args | null

opacity

number | null

create_wall

Create a vertical wall from two floor-level centerline endpoints, plus height and thickness.

FieldType
parent_id

number

name

string

start
end
height

number

thickness

number

color

Color3Args | null

opacity

number | null

create_brick_between_points

Create a brick from two endpoint centers, width, and height. The brick length runs along local Z from start to end, and local Y stays as close to world up as possible.

FieldType
parent_id

number

name

string

start
end
width

number

height

number

color

Color3Args | null

opacity

number | null

create_ball

Create a ball from a center point and radius.

FieldType
parent_id

number

name

string

center
radius

number

color

Color3Args | null

opacity

number | null

create_cylinder

Create a cylinder from a center point, radius, length, and optional XYZ rotation in degrees. The unrotated cylinder length runs along local Z.

FieldType
parent_id

number

name

string

center
radius

number

length

number

rotation_degrees

Vec3Args | null

color

Color3Args | null

opacity

number | null

create_cylinder_between_points

Create a cylinder from two endpoint centers and a radius.

FieldType
parent_id

number

name

string

start
end
radius

number

color

Color3Args | null

opacity

number | null

Playtest

start_ai_headless_playtest_server

Start a new "playtest" testing server that runs exactly like a normal server. All scripts execute, etc. The world is a snapshot taken now, so start a new one after editing to test the change. Only one playtest runs at a time, so starting one always replaces the previous one and clears its logs.

{}

start_ai_headless_playtest_client

Make one player join the running playtest server, the way a real player joining would. Returns their client_id. Call this again for each extra player, up to 8.

{}

stop_ai_headless_playtest_client

Make one player leave the playtest server, the way a real player quitting would. The server and every other player keep running.

FieldType
client_id

number

read_ai_headless_playtest_logs

Read console output from the running playtest server or client, oldest first. Pass the next_seq from the previous call as after_seq to continue where you left off, and wait_ms to sleep that long before reading so the game has time to print more. Each entry is one console call and can span several lines. Waits longer than 10000ms are shortened to that.

FieldType
after_seq

number | null

max_bytes

number | null

wait_ms

number | null

Sleep this long before reading, so the game has time to print more. This is a plain delay from now, not a point in the game's life. Max 10s.

source

string | null

Which runtime to read, written as "server" or "client_<client_id>" (for example "client_1"). Omit to read all.

stop_ai_headless_playtest_all

Stop and cleanup the whole playtest server and all its clients. This happens automatically when your turn ends, so only call it to free things up early.

{}

Meta

report_issue

Report that tool behavior or the current system instructions or tool definitions are missing, conflicting, or unclear for the task. Use this instead of guessing when tool calling does not go to plan.

FieldType
description

string

run_parallel

Run multiple tool calls concurrently and return one status per subcall. Each tool_calls[].args value must be a JSON string for that subtool, and timeout_ms applies to the whole batch.

FieldType
tool_calls
timeout_ms

number | null

Types

DataMode

"mesh" | "sound" | "texture" | "all"

InspectMode

"info" | "physics" | "all"

Vec3Args

FieldType
x

number

y

number

z

number

GameVisibility

"Private" | "Published"

Color3Args

FieldType
r

number

g

number

b

number

RunParallelToolCallArgs

FieldType
call_id

string | null

tool_name
args

string

ToolName

"create_object" | "add_default_material" | "delete_object" | "read_dirty_scripts_in_workspace" | "read_all_script_warnings" | "read_script_raw_code" | "write_script_raw_code" | "get_placement_warnings" | "ls" | "inspect" | "grep" | "get_path" | "get_game_settings" | "copy_and_paste" | "edit_object" | "set_game_settings" | "publish" | "ls_data" | "inspect_data" | "move_by_recursively" | "move_to_recursively" | "scale_recursively" | "rotate_recursively" | "run_temporary_script" | "create_brick" | "create_box_between_corners" | "create_wall" | "create_brick_between_points" | "create_ball" | "create_cylinder" | "create_cylinder_between_points" | "report_issue" | "run_parallel" | "start_ai_headless_playtest_server" | "start_ai_headless_playtest_client" | "stop_ai_headless_playtest_client" | "read_ai_headless_playtest_logs" | "stop_ai_headless_playtest_all"