set_script_text
Overwrite an existing script asset's full source code, then run script_parse so the editor re-reads the script's name and attributes.
Instructions
Overwrite the source code of an existing script asset. Provide the full file contents in text. After changing the code, call script_parse so the editor re-reads the script's name and attributes. When NOT to use: to attach a script to an entity (use attach_script) or to create the script asset itself (use create_assets type="script").
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": {
"assetId": "<assetId>",
"text": "<text>"
},
"name": "set_script_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Full JavaScript/TypeScript source of the script | |
| assetId | Yes | Script asset id |