Look up stored values in a column
lookup_valuesQuery live distinct values in a table column to confirm exact literals for SQL WHERE filters. Returns matching values with row counts, spelling suggestions, or top values when no substring is given.
Instructions
Query live distinct values stored in one column ('table.column') to ground exact literal filters (places, products, statuses) before writing SQL. Use after get_query_context whenever a WHERE filter value is uncertain; use search_ontology to find which table or column holds a concept. Returns matching values with row counts, close spelling suggestions when contains matches nothing, or top values when contains is omitted.
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": {
"column": "<column>"
},
"name": "lookup_values"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum distinct values to return (1-100). | |
| column | Yes | Target column formatted as 'table.column' (or 'schema.table.column'). | |
| contains | No | Case-insensitive substring to filter values; omit to return the most frequent values. | |
| datasource | No | Datasource name. Optional when only one datasource is registered. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||