format_sql
Use this when the user wants SQL pretty-printed or reformatted: one clause per line, optional upper-case keywords and trailing semicolon. Comments are not kept. Returns {formatted_sql, options}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL string to format | |
| indent_size | No | Spaces per indent level for nested blocks such as CREATE TABLE columns; clauses always start at column 0. 0 puts each statement on one line (default: 2) | |
| add_semicolon | No | Append a trailing semicolon (default: false) | |
| uppercase_keywords | No | true upper-cases all SQL keywords (AND, IN, CASE, ...), but not data type names. false keeps the formatter's casing: clause keywords (SELECT, FROM, WHERE, ...) upper-case, other keywords (e.g. and, or) may keep their input case (default: false) |