fixSql
Analyzes and fixes SQL errors by processing the SQL statement, error message, and database ID to resolve database issues.
Instructions
Analyze and fix the SQL error based on the provided SQL statement, error message, and database ID.If you don't know the databaseId, first use getDatabase or searchDatabase to retrieve it. (1) If you have the exact host, port, and database name, use getDatabase. (2) If you only know the database name, use searchDatabase. (3) If you don't know any information, ask the user to provide the necessary details. Note: searchDatabase may return multiple databases. In this case, let the user choose which one to use.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes | DMS databaseId | |
| question | No | Natural language question | |
| sql | Yes | The SQL that caused an error | |
| error | Yes | SQL error message | |
| model | No | Optional: if a specific model is desired, it can be specified here |