util_sql_format
SQL formatter — Pretty-print SQL offline: one clause per line (SELECT, FROM, JOINs with ON, WHERE with AND/OR, GROUP BY, HAVING, ORDER BY, LIMIT, UNION, CTEs, INSERT/UPDATE/DELETE), select lists one column per line, indented subqueries, keywords upper or lower case (case=upper|lower|preserve) and indent=1-8 spaces. Strings, quoted identifiers and comments are kept verbatim; multiple statements split on semicolons. Also returns statement count, tables referenced and warnings (SELECT *, UPDATE or DELETE without WHERE, unbalanced parentheses, unterminated strings). Up to 100,000 chars. Price: $0.002 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": "util_sql_format"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | e.g. select u.id,u.name,count(o.id) as n from users u left join orders o on o.user_id=u.id where u.active=1 group by u.id,u.name order by n desc limit 10 |