get_distinct_values
Examine the distinct values in a column and their frequency to understand data distribution before writing queries or constraints.
Instructions
Return the distinct values of a column and how many rows contain each value, ordered by frequency. Use this to understand the range of values in a column before writing WHERE clauses or CHECK constraints. Returns [{value, count}] ordered by count descending.
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": {
"database": "<database>",
"table": "<table>",
"column": "<column>"
},
"name": "get_distinct_values"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database key from list_databases. | |
| table | Yes | Table name. Automatically uppercased. | |
| column | Yes | Column name to inspect. Automatically uppercased. | |
| limit | No | Maximum number of distinct values to return, ordered by frequency. Defaults to 20. |