execute_sql_file
Execute SQL scripts from whitelisted file paths against your database, with dry-run and transaction control for safe deployment.
Instructions
执行 .sql 文件(最多 1000 条语句)。需要 permissions 包含 script + DB_ALLOWED_FILE_PATHS。⚠️ 路径必须在 DB_ALLOWED_FILE_PATHS 白名单内。
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": {
"filePath": "<filePath>"
},
"name": "execute_sql_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | v4.0 G8 增强:true = 只解析 + lint,不执行 | |
| filePath | Yes | 文件路径(必须在白名单内) | |
| maxStatements | No | ||
| useTransaction | No |