execute_script
Execute multi-statement SQL scripts with GO batch separators, running sequentially and stopping on first failure. Use for table creation and data initialization.
Instructions
批量执行一段 SQL 脚本,支持多条语句与 GO 分隔符(按顺序执行,任一批次失败即停止并报告)。适合建表、初始化数据等场景。
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": {
"sql": "<sql>"
},
"name": "execute_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL 脚本内容(多条语句用 ; 或 GO 分隔) | |
| timeout | No | 每个批次的超时毫秒数 | |
| database | No | 目标数据库名,默认当前连接数据库 |