generate_sql
Translate a natural-language question into an SQL statement using an LLM. Review the generated SQL before executing it with run_sql.
Instructions
Translate a natural-language question into SQL via the server LLM, without executing it.
Requires an LLM provider to be configured. Use when you want to review or edit the SQL before running it with run_sql. For zero-key operation, use get_semantic_context and write the SQL yourself; to also execute and interpret in one step, use ask. Returns the generated SQL plus supporting details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | Target database connection — its name or id (case-insensitive). List the available connections with list_connections. | |
| question | Yes | Natural-language question to translate into SQL. |