cc_call
Calls a ComputerCraft peripheral method with JSON arguments and returns its results or error data, so you can inspect or control in-game peripherals.
Instructions
Call one peripheral method and return its result(s): peripheral.call(name, method, *args).
args is a JSON list (numbers, strings, booleans; objects/arrays become Lua tables). Errors from the
peripheral (wrong argument, bad enum value) come back as data. Getters are safe; setters, assemble/disassemble
and similar change the live world - ask first. Setters wait for the next game tick (game must be focused).
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": {
"peripheral": "<peripheral>",
"method": "<method>"
},
"name": "cc_call"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| method | Yes | ||
| timeout | No | ||
| computer | No | ||
| peripheral | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |