score_risk
Calculate a combined risk score for SQL migrations, aggregating lock severity and data loss potential into a single 0-100 score for CI gate automation.
Instructions
Calculate the combined risk score (0-100) for a SQL migration. Aggregates both lock risk severity (ACCESS EXCLUSIVE, SHARE locks) and data loss potential (DROP, TRUNCATE, type changes) into a single score. Useful for CI gates and automated migration review pipelines.
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": {
"filename": "<filename>",
"sql": "<sql>"
},
"name": "score_risk"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL content of the migration file | |
| filename | Yes | Migration filename |