play_code
Evaluates arbitrary SuperCollider sclang code and returns console output or errors, syncing automatically before and after execution to support safe SynthDef compilation.
Instructions
Evaluate arbitrary sclang code (SynthDef, Pdef, Tdef, Ndef, patterns, buffers, microtonal scales, etc.) and return console output/errors. Automatically syncs before/after for safe SynthDef compilation.
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": {
"code": "<code>"
},
"name": "play_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | SuperCollider code to evaluate | |
| timeout | No | Evaluation timeout in ms |