fix_sql
Fix SQL syntax and style issues in a raw string using a specified dialect, returning corrected SQL without modifying files. Optionally restrict fixes to specific rules.
Instructions
Fix a raw SQL string using an explicitly specified dialect and return the fixed SQL text (does not touch any file).
Args: sql: The SQL text to fix. dialect: SQLFluff dialect name, e.g. "ansi", "bigquery", "snowflake", "postgres". rules: Optional list of rule codes/names to restrict fixing to.
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>",
"dialect": "<dialect>"
},
"name": "fix_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| rules | No | ||
| dialect | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||