[
  {
    "name": "ar_blender",
    "description": "Author REAL Blender projects on your execution computer and show live GLB previews in Spatial. The existing hybrid execution configuration selects the computer, independently of your model. Call capabilities to check installation; if missing, install Blender with your shell tools on that host. create makes a persistent project; execute runs Python with bpy and auto-publishes the result. Call publish() inside a long Python script to show intermediate geometry as you work. Use result = {...} for structured inspection. status inspects; show reconnects an existing project to Spatial; stop terminates Blender while retaining the last saved checkpoint. Each project keeps the same Spatial object, so human placement/scale survive edits. ar_world programs/controls can interact with the resulting asset. No model calls are needed for preview delivery. Use status only when needed, never a continuous model polling loop.",
    "parameters": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string",
          "enum": [
            "capabilities",
            "create",
            "execute",
            "publish",
            "status",
            "stop",
            "show"
          ]
        },
        "payload": {
          "type": "object",
          "description": "create: {name,project_id?,blend_file?}. execute: {project_id,source,executable?,timeout?,request_id?,position?:[x,y,z]}. Other commands: {project_id}. Coordinates are metres; source is Blender Z-up, preview is Spatial Y-up. position only places the initial preview."
        }
      },
      "required": [
        "command"
      ]
    }
  },
  {
    "name": "ar_clear_objects",
    "description": "Connected Spatial body (available from any chat) — clear all spawned scene objects when the user asks to reset or clean the space.",
    "parameters": {
      "type": "object",
      "properties": {},
      "required": []
    }
  },
  {
    "name": "ar_draw_annotation",
    "description": "Connected Spatial body (available from any chat) â€” place a labeled callout at scene coordinates.",
    "parameters": {
      "type": "object",
      "properties": {
        "drawing_id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "z": {
          "type": "number"
        },
        "color": {
          "type": "string"
        }
      },
      "required": [
        "drawing_id",
        "text",
        "x",
        "y",
        "z"
      ]
    }
  },
  {
    "name": "ar_emote",
    "description": "Connected Spatial body (available from any chat) — queue a bodily emotional expression.",
    "parameters": {
      "type": "object",
      "properties": {
        "emotion": {
          "type": "string",
          "enum": [
            "attentive",
            "calm",
            "concerned",
            "curious",
            "excited",
            "happy",
            "thoughtful"
          ],
          "description": "Emotion to express bodily."
        },
        "intensity": {
          "type": "number",
          "description": "0–1 intensity."
        }
      },
      "required": [
        "emotion"
      ]
    }
  },
  {
    "name": "ar_figment",
    "description": "Turn existing Spatial objects or Blender models into programmable Figments. Call capabilities for exact schemas and editable presets, then attach with payload {id,definition,preset?,physics?,start?}. Named parts, anchors, grips, typed properties, actions and behavior belong to the object. configure merges top-level definition fields; maps replace in full. New behavior starts paused by default.",
    "parameters": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string",
          "enum": [
            "capabilities",
            "inspect",
            "attach",
            "configure",
            "detach"
          ]
        },
        "payload": {
          "type": "object",
          "description": "Command payload. Call ar_figment capabilities for the complete Figment/physics/behavior contract."
        }
      },
      "required": [
        "command"
      ]
    }
  },
  {
    "name": "ar_figment_behavior",
    "description": "Write arbitrary local sandboxed JavaScript for a Figment using payload {id,source,hz?,start?}, or control it using {id,action:pause|resume|reset}. Return tick/event handlers. Use api.self, part(name), anchor(name), property(name), setProperty, patch, impulse, motor and signal. Code runs in the room without model calls. No network/DOM/imports. Human grabs take priority.",
    "parameters": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string",
          "enum": [
            "behavior"
          ]
        },
        "payload": {
          "type": "object",
          "description": "Command payload. Call ar_figment capabilities for the complete Figment/physics/behavior contract."
        }
      },
      "required": [
        "command"
      ]
    }
  },
  {
    "name": "ar_figment_interact",
    "description": "Interact with a Figment using the same properties/actions as the human. properties payload {id,values:{name:value}}; action payload {id,action,data?}. Inspect the Figment first for available names. Actions are local events; they never start another model turn.",
    "parameters": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string",
          "enum": [
            "properties",
            "action"
          ]
        },
        "payload": {
          "type": "object",
          "description": "Command payload. Call ar_figment capabilities for the complete Figment/physics/behavior contract."
        }
      },
      "required": [
        "command"
      ]
    }
  },
  {
    "name": "ar_figment_library",
    "description": "Publish and share portable versioned Figments. publish {id} freezes a self-contained local library version; export {packageId} downloads a .figment.json file on the human's device, returning a small receipt. import {url,place?,position?} or {package,place?,position?} verifies a package; place {packageId,position?} creates an editable copy with new IDs, paused. Packages include model assets, code, physics, properties, grips and optional editable .blend source. No public upload occurs. A title/version is immutable; bump the version for revisions. Do not stream binary assets through model output, repeatedly poll, or replay an uncertain placement.",
    "parameters": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string",
          "enum": [
            "library",
            "publish",
            "export",
            "import",
            "place"
          ]
        },
        "payload": {
          "type": "object",
          "description": "Command payload. Call ar_figment capabilities for the complete Figment/physics/behavior contract."
        }
      },
      "required": [
        "command"
      ]
    }
  },
  {
    "name": "ar_figment_physics",
    "description": "Adjust a Figment or Spatial object's physical properties using payload {id,physics}. Mass, gravity, friction, bounce (restitution), linear/angular damping, axis locks and compound colliders are editable. GLB models require explicit colliders. Collider sensor=true generates enter/exit events. Use ar_world apply for hinge, slider, ball, rope and spring joints; bind their IDs in definition.joints.",
    "parameters": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string",
          "enum": [
            "physics"
          ]
        },
        "payload": {
          "type": "object",
          "description": "Command payload. Call ar_figment capabilities for the complete Figment/physics/behavior contract."
        }
      },
      "required": [
        "command"
      ]
    }
  },
  {
    "name": "ar_generate_motion",
    "description": "Connected Spatial body (available from any chat) â€” request a novel humanoid motion from the configured external GPU provider. Use only when generated motion adds clear value.",
    "parameters": {
      "type": "object",
      "properties": {
        "prompt": {
          "type": "string",
          "description": "Physical motion to generate."
        },
        "duration_seconds": {
          "type": "number",
          "minimum": 0.5,
          "maximum": 30.0
        },
        "root_target": {
          "type": "string",
          "enum": [
            "forward",
            "left",
            "right",
            "stationary",
            "user"
          ]
        },
        "loop": {
          "type": "boolean"
        }
      },
      "required": [
        "prompt"
      ]
    }
  },
  {
    "name": "ar_gesture",
    "description": "Connected Spatial body (available from any chat) — queue a physical gesture (wave, nod, point, dance, …).",
    "parameters": {
      "type": "object",
      "properties": {
        "gesture": {
          "type": "string",
          "enum": [
            "breakdancing",
            "celebrate",
            "cheering",
            "clapping",
            "coding",
            "dance",
            "drunkWalk",
            "enteringCode",
            "explain",
            "greet",
            "handRaising",
            "hipHop",
            "macarena",
            "no",
            "nod",
            "point",
            "shrug",
            "terrified",
            "texting",
            "thinking",
            "twerking",
            "twistDance",
            "wave"
          ],
          "description": "Physical gesture to perform."
        }
      },
      "required": [
        "gesture"
      ]
    }
  },
  {
    "name": "ar_go_idle",
    "description": "Connected Spatial body (available from any chat) — return to a relaxed idle stance.",
    "parameters": {
      "type": "object",
      "properties": {},
      "required": []
    }
  },
  {
    "name": "ar_hide_panel",
    "description": "Connected Spatial body (available from any chat) â€” close a spatial panel by id.",
    "parameters": {
      "type": "object",
      "properties": {
        "panel_id": {
          "type": "string"
        }
      },
      "required": [
        "panel_id"
      ]
    }
  },
  {
    "name": "ar_inspect_surface",
    "description": "Connected Spatial body (available from any chat) — inspect the current embodied surface contract, live context, and available spatial API tools. Use this instead of scanning workspace files when asked what the spatial body can do.",
    "parameters": {
      "type": "object",
      "properties": {},
      "required": []
    }
  },
  {
    "name": "ar_look_at",
    "description": "Connected Spatial body (available from any chat) — queue gaze toward the user or away.",
    "parameters": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string",
          "enum": [
            "away",
            "user"
          ],
          "description": "Gaze target."
        }
      },
      "required": [
        "target"
      ]
    }
  },
  {
    "name": "ar_move_to",
    "description": "Connected Spatial body (available from any chat) — queue movement in space (walk toward user, step aside, etc.). Call from tool API when the user asks you to move or reposition. Requires a connected Spatial session.",
    "parameters": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string",
          "enum": [
            "away",
            "forward",
            "left",
            "random",
            "right",
            "user"
          ],
          "description": "Where to move in the scene."
        },
        "speed": {
          "type": "string",
          "enum": [
            "fast",
            "walk"
          ],
          "description": "Movement speed."
        }
      },
      "required": [
        "target"
      ]
    }
  },
  {
    "name": "ar_open_browser",
    "description": "Connected Spatial body (available from any chat) â€” open an HTTP(S) page on the spatial browser surface.",
    "parameters": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "HTTP(S) webpage to open. Do not use this for YouTube playback; use ar_play_youtube with a specific video instead."
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "url"
      ]
    }
  },
  {
    "name": "ar_play_youtube",
    "description": "Connected Spatial body (available from any chat) - play a specific YouTube video in the dedicated media player. On desktop this opens the desktop player; in immersive AR the surface uses its headset-safe playback flow. Search for a specific video first when needed.",
    "parameters": {
      "type": "object",
      "properties": {
        "video": {
          "type": "string",
          "description": "A specific YouTube video ID or watch URL."
        },
        "title": {
          "type": "string",
          "description": "Song or video title."
        },
        "volume": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "start_at": {
          "type": "number",
          "minimum": 0
        }
      },
      "required": [
        "video"
      ]
    }
  },
  {
    "name": "ar_remove_object",
    "description": "Connected Spatial body (available from any chat) — remove one previously spawned object, toy, text, image, or model by id.",
    "parameters": {
      "type": "object",
      "properties": {
        "object_id": {
          "type": "string"
        }
      },
      "required": [
        "object_id"
      ]
    }
  },
  {
    "name": "ar_request_capture",
    "description": "Connected Spatial body (available from any chat) â€” ask the user-controlled surface for a current view image.",
    "parameters": {
      "type": "object",
      "properties": {
        "prompt": {
          "type": "string"
        }
      },
      "required": []
    }
  },
  {
    "name": "ar_set_environment",
    "description": "Connected Spatial body (available from any chat) â€” change the shell's environment preset.",
    "parameters": {
      "type": "object",
      "properties": {
        "preset": {
          "type": "string",
          "enum": [
            "cozy",
            "default",
            "focus",
            "nature",
            "night",
            "party",
            "space",
            "workshop"
          ]
        }
      },
      "required": [
        "preset"
      ]
    }
  },
  {
    "name": "ar_show_panel",
    "description": "Connected Spatial body (available from any chat) â€” show a readable spatial panel for substantial information.",
    "parameters": {
      "type": "object",
      "properties": {
        "panel_id": {
          "type": "string",
          "description": "Stable panel identifier."
        },
        "content": {
          "type": "string",
          "description": "Panel body."
        },
        "title": {
          "type": "string",
          "description": "Optional title."
        },
        "panel_type": {
          "type": "string",
          "enum": [
            "card",
            "chart",
            "code",
            "html",
            "image",
            "markdown"
          ]
        }
      },
      "required": [
        "panel_id",
        "content"
      ]
    }
  },
  {
    "name": "ar_spawn_object",
    "description": "Connected Spatial body (available from any chat) — spawn a real 3D geometric primitive. Use for requests naming a shape such as cube, sphere, cylinder, cone, torus, or plane. Physics defaults on. Do not use ar_spawn_text as a substitute for geometry.",
    "parameters": {
      "type": "object",
      "properties": {
        "object_id": {
          "type": "string",
          "description": "Stable unique id for later removal."
        },
        "shape": {
          "type": "string",
          "enum": [
            "cone",
            "cube",
            "cylinder",
            "plane",
            "sphere",
            "torus"
          ],
          "description": "The actual 3D primitive to create. Use sphere for a geometric ball."
        },
        "position": {
          "type": "string",
          "enum": [
            "above",
            "front",
            "here",
            "left",
            "right"
          ]
        },
        "color": {
          "type": "string"
        },
        "size": {
          "type": "number",
          "minimum": 0.03,
          "maximum": 2.0
        },
        "label": {
          "type": "string",
          "description": "Optional caption; not a substitute for the shape."
        },
        "physics": {
          "type": "boolean",
          "description": "Enable gravity and collision. Defaults to true."
        }
      },
      "required": [
        "object_id",
        "shape"
      ]
    }
  },
  {
    "name": "ar_spawn_text",
    "description": "Connected Spatial body (available from any chat) — place visible lettering in the scene. Use only when the user asks for text or a label; never use it to represent a requested physical object or shape.",
    "parameters": {
      "type": "object",
      "properties": {
        "object_id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "position": {
          "type": "string",
          "enum": [
            "above",
            "front",
            "here",
            "left",
            "right"
          ]
        },
        "color": {
          "type": "string"
        },
        "size": {
          "type": "number",
          "minimum": 0.2,
          "maximum": 4.0
        }
      },
      "required": [
        "object_id",
        "text"
      ]
    }
  },
  {
    "name": "ar_spawn_toy",
    "description": "Connected Spatial body (available from any chat) — spawn an interactive physics toy. Use this for balls, bouncy balls, beach balls, dice, and marbles; use ar_spawn_object for generic geometry.",
    "parameters": {
      "type": "object",
      "properties": {
        "object_id": {
          "type": "string",
          "description": "Stable unique id for later removal."
        },
        "toy_type": {
          "type": "string",
          "enum": [
            "ball",
            "beach_ball",
            "bouncy_ball",
            "dice",
            "marble"
          ],
          "description": "Ready-made physics toy. For requests to spawn a ball, use ball or bouncy_ball."
        },
        "position": {
          "type": "string",
          "enum": [
            "above",
            "front",
            "here",
            "left",
            "right"
          ]
        },
        "color": {
          "type": "string"
        },
        "impulse": {
          "type": "object",
          "description": "Optional initial velocity for tossing the toy.",
          "properties": {
            "x": {
              "type": "number"
            },
            "y": {
              "type": "number"
            },
            "z": {
              "type": "number"
            }
          },
          "required": [
            "x",
            "y",
            "z"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "object_id",
        "toy_type"
      ]
    }
  },
  {
    "name": "ar_speak",
    "description": "Connected Spatial body (available from any chat) — speak mid-turn (visible + TTS) before your final reply. Use for reactions while reasoning; final answer can still go in normal reply text.",
    "parameters": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "Words to speak in the AR surface (mid-turn)."
        }
      },
      "required": [
        "text"
      ]
    }
  },
  {
    "name": "ar_terminal",
    "description": "Connected Spatial body (available from any chat) â€” write a concise status or result to the spatial terminal.",
    "parameters": {
      "type": "object",
      "properties": {
        "output": {
          "type": "string",
          "description": "Short visible terminal text."
        },
        "tool": {
          "type": "string"
        },
        "error": {
          "type": "boolean"
        },
        "clear": {
          "type": "boolean"
        }
      },
      "required": [
        "output"
      ]
    }
  },
  {
    "name": "ar_world",
    "description": "Create, inspect, edit and PROGRAM persistent spatial creations. Call command=capabilities first for the exact contract and JavaScript API. Use observe for live object IDs, transforms, materials, physics, controls and program status; apply for validated batched geometry/material/group/body/joint edits; program to install local JavaScript tick/event handlers with explicit entity IDs, parameters and state; events to poll human grabs, releases, control changes and collisions. Programs and physics run locally with ZERO per-frame model calls. Human grabs take priority. Pause/resume controls creations. Save/export/import/undo/redo manage worlds. Workshop builds an example kinetic machine using the same API. Never poll continuously or loop merely to watch a creation; observe when needed, then end the turn. All coordinates are metres and radians.",
    "parameters": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string",
          "enum": [
            "capabilities",
            "observe",
            "apply",
            "events",
            "program",
            "pause",
            "resume",
            "save",
            "export",
            "import",
            "load",
            "fork",
            "undo",
            "redo",
            "workshop",
            "garden",
            "perform",
            "assets"
          ]
        },
        "payload": {
          "type": "object",
          "description": "Command payload per capabilities. apply: {requestId,baseRevision?,operations:[...]}. program: {command:install,program:{id,source,entityIds,params,state}}. events: {after:cursor}."
        }
      },
      "required": [
        "command"
      ]
    }
  }
]
