Candy Cane Games

Editor tools

These docs are made to be read by both humans and AI. They are the same docs given to your AI when it runs!

Reads

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 by looking up its uploaded texture data ids. The available material names are: {}. Returns the newly created material id.

FieldType
name

string

delete_object

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

FieldType
object_id

number

read_dirty_scripts_in_workspace

Read the current dirty script text from the editor workspace, 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 all scripts in the current editor workspace.

{}

read_script_raw_code

Read the stored raw code for one script object.

FieldType
object_id

number

ls

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

FieldType
in

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, type, parent, pointer relationships, referenced data ids, and substring search over serialized object info.

FieldType
name

string | null

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

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

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

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

Input 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" | "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"