craftos_sim_command
Change a running ComputerCraft simulation by sending commands to add players, move computers, set peripherals, alter the world, and advance time; returns the updated state or a delta.
Instructions
Change the simulated world while a session runs. Commands: addPlayer {name}, join/leave {player}, setPlayerPos {player, x, y, z, dimension?}, setComputerPos {x?, y?, z?, dimension?} (move this computer, modems included; on a network use craftos_network_update), unload / load (the computer's chunk unloads and it stops; load boots it afresh), chat {player, message} (fires a chat event), playerClick {player}, setItem {peripheral, slot, item|null}, setEnergy {peripheral, energy} (what a generic energy_storage holds), setFluid {peripheral, tank? (1-based, default 1), fluid {name, amount}|null} (what one tank holds), setEnergyTransferRate {peripheral, rate}, setRedstoneInput {peripheral, side, level}, completeCraft {peripheral, name?} (finish an ME/RS crafting job), setNetworkConnected {peripheral, connected}, setEnvironment {values:{time, raining, thunder, ...}}, addEntity {entity}, attachPeripheral / detachPeripheral / resizeMonitor, insertDisk {peripheral, disk} / ejectDisk {peripheral} (a player puts a floppy into a drive or takes it out: disk / disk_eject), Mekanism QIO: qioSetPowered {block, powered}, qioSetDrive {block, slot, drive|null}, qioSetSecurity {block, mode}, qioSetUpgrades {block, speed}, qioInsert/qioExtract {frequency, item}, Quantum Entangloporter: qeInsert {frequency, item, public?, owner?}, qeExtract {frequency, count?}, qeSetLoaded {block, loaded} (see docs/mekanism-qio.md), seed {value} (pin math.random), advance {seconds} (jump the virtual clock and fire due timers). With the vhcctweaks addon also: interact {player} (right-click the computer), approve {player?, nonce?} (click [APPROVE]), revoke {player?}, setBalance {player, balance}, setHost {player?}, setEconomy {available}, rcExec {player, code}, setVaultLevel / setEquipment / setOnOtherServer (2.2.36), setGearPower / setTemper / setReputation / setGreedTier / setSkills / setStats (2.2.37), internalError {function, times?}, setEconomyDelay {ticks}, refuseTransfers {times?}; craftos_help {topic:"world"} has their shapes. Returns the sim state, or with delta:true only what changed. Commands are applied when the program next waits for an event; this call returns once they are.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"command": "<command>"
},
"name": "craftos_sim_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id returned by craftos_session_create. | |
| delta | No | Return only what changed since the previous call. | |
| command | Yes | A command object, e.g. {cmd:'interact', player:'Alice'}. |