run_script_with_vars
Define MySQL variables and run a script with them, supporting sandbox transaction rollback for safe testing.
Instructions
Prepend SET @var statements then run a 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": {
"variables": "<variables>",
"script": "<script>"
},
"name": "run_script_with_vars"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | ||
| sandbox | No | When true, wrap writes in a transaction and ROLLBACK (default from config) | |
| database | No | Database/schema name; defaults to connection default_database | |
| variables | Yes | ||
| connection | No | Named connection from config; defaults to default_connection |