log_correction
Log a corrected SQL query to help AI learn from past mistakes and avoid repeating them in future database interactions.
Instructions
Log a query correction for future AI context.
When the editor AI generates a wrong query and the user corrects it, log the correction here. Bollard persists it and exposes it via the bollard://corrections/{alias} MCP Resource, so the AI automatically learns from past mistakes without the user repeating themselves.
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": {
"connection": "<connection>",
"original_query": "<original_query>",
"corrected_query": "<corrected_query>",
"note": "<note>"
},
"name": "log_correction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | Plain English explanation of what was wrong and why. Examples: - "Exclude test accounts: email LIKE '%@test.com%'" - "Use created_at, not signup_date — signup_date is deprecated" - "active users means subscription_status = 'active', not last_login" | |
| connection | Yes | Database alias. | |
| original_query | Yes | The incorrect SQL that was generated. | |
| corrected_query | Yes | The correct SQL (or empty if just a note). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |