Assemble SQL query context for Terms
get_query_contextAssembles qualified tables, mapped columns, join paths, verified example queries, glossary entries, and dialect rules for specified terms so you can write SQL without separate lookups.
Instructions
Assemble everything needed to write SQL for a set of Terms: qualified tables, mapped columns with sample values/formats, SQL attributes, the connecting join path (with FROM/JOIN SQL and role notes), verified example queries, glossary entries, and dialect rules. Call after check_answerable instead of calling get_term, describe_table, and find_join_path separately; use lookup_values next for exact filter literals. Lists unknown inputs under unresolved with suggestions, and fails if zero Terms resolve.
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": {
"terms": "<terms>"
},
"name": "get_query_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| terms | Yes | List of Term names, synonyms, or ids needed to answer the question. | |
| question | No | User question used to retrieve matching verified example SQL queries. | |
| datasource | No | Datasource name. Optional when only one datasource is registered. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||