Validate Script
validate_scriptStructurally validate a list of commands for a bot type before saving or playing, reporting any issues by command index. Pass the script's variables as well and it also cross-checks the bindings against the ${...} and bot.getVariable reads in the commands, warning about a read nothing supplies, a binding nothing reads, and a per-occurrence variable read more than once in an iteration. Warnings never make a script invalid and never stop a save — all three are legal scripts.
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": {
"botType": "<botType>",
"commands": "<commands>"
},
"name": "validate_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| botType | Yes | The bot type the commands are for. HTTP is a Protocol Bot script, BROWSER is a Browser Bot script, and PLAYWRIGHT is a Playwright script. "Browser script" is ambiguous: Browser Bot and Playwright are different types, so if the user's wording doesn't say which, ask before creating. | |
| commands | Yes | The commands to validate, each a JSON object with a 'type'. | |
| variables | No | The script's variable bindings, as get_script returns them. Omit to skip the binding cross-check and validate structure alone. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| issues | Yes | ||
| warnings | Yes |