Skip to main content
Glama

Distinct values

distinct_values
Read-onlyIdempotent

Most frequent values of a column with counts. Use it to get exact spellings (e.g. "France" vs "FR") before filtering.

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": {
      "dataset_id": "<dataset_id>",
      "column": "<column>"
    },
    "name": "distinct_values"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
whereNo
columnYes
versionNoThe dataset version from an earlier result's meta (or one listed in describe_dataset's versions). Pass it when you chain calls (distinct_values, then aggregate): the answer stays on that version even if the data was refreshed in between (meta then has stale: true and current_version). If that version is no longer kept, the call fails with source_changed.
dataset_idYesDataset id from list_datasets, e.g. ds_ab12cd34ef56

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / where / items / properties / op / description
      Previous value: -"between takes [low, high] and includes both ends; in/not_in take an array; contains/starts_with are case-insensitive text matches"New value: +"between takes [low, high] and includes both ends; in/not_in take an array; contains/starts_with are case-insensitive text matches; on date and timestamp columns a value can be relative to the time of the query: now, now-30d, now-12w, now-3m, now-1y"
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds that results are frequency-ranked with counts, which goes beyond the annotations, but it omits the truncation behavior implied by the undocumented limit (default, max 500) and how ties/ordering are handled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, and the behavioral clarification (most frequent, with counts) is front-loaded ahead of the usage hint. Nothing could be cut without losing signal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter read tool with 40% schema coverage and no output schema, the description should say more about the return shape beyond "with counts" — ordering, truncation by limit, and whether filters (where) affect the value counts. The core purpose is clear, but an agent must still open the schema to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 40%, so the description must carry weight. It does: the opening clause says results are "most frequent values... with counts", clarifying that the output is frequency-ranked and truncated to the limit parameter rather than an exhaustive distinct list, and it adds the concrete purpose of comparing exact spellings (e.g. "France" vs "FR") before building a filter, which tells the agent what kind of column-conditional use this serves. It still says nothing about choosing a limit value or about the version/staleness mechanics, so it does not fully compensate for "column" and "limit" being undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Most frequent values of a column with counts" is a specific statement of what comes back, and it usefully corrects the name's implication that all distinct values are returned. It does not name or distinguish itself from siblings such as aggregate or query_rows, so it stops short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The second sentence gives a concrete when-to-use: resolve exact spellings ("France" vs "FR") before filtering. That is genuinely actionable, but there is no when-not guidance and no mention of the obvious alternative (aggregate with a group-by) for count-style breakdowns.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.