add_sample_query
Save natural language and SQL query pairs to use as few-shot examples for generating SQL from questions.
Instructions
Save a validated natural-language -> SQL example to improve future generation.
Use to capture good question/SQL pairs for this connection; they are reused as few-shot examples by generate_sql and ask. Returns the new example's id.
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>",
"natural_language": "<natural_language>",
"sql_query": "<sql_query>"
},
"name": "add_sample_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | Target database connection — its name or id (case-insensitive). List the available connections with list_connections. | |
| natural_language | Yes | Example question in natural language. | |
| sql_query | Yes | Correct, validated SQL that answers the question. | |
| description | No | Optional note about the example. |