ai_sql_review
SQL query review — Review a SQL query: exact rule-based lint (UPDATE/DELETE without WHERE, DROP/TRUNCATE, SELECT *, leading-wildcard LIKE, functions on indexed columns, NOT IN with NULLs, ORDER BY random, deep OFFSET, comma cross joins, string-built SQL injection risk) plus an AI explanation of what it does, execution steps, performance tips, index suggestions and logic bugs. Pass sql=; optional dialect= and schema= (CREATE TABLE text). Returns overall risk LOW/MEDIUM/HIGH/CRITICAL. Price: $0.008 USDC (Base, via x402).
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": "ai_sql_review"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SELECT * FROM orders WHERE LOWER(email) = 'a@b.com' |