add_script
Adds a whole stack of blocks to an mBlock project from a file, starting with a hat. Handles substacks, shadows, and parent/next links to place scripts correctly.
Instructions
Put a whole stack of blocks at once (file). First entry should be a hat. Handles next/parent/shadows + SUBSTACK.
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": {
"blocks": "<blocks>"
},
"name": "add_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| path | No | ||
| blocks | Yes | ||
| dryRun | No | ||
| target | No | ||
| confirm | No |