Skip to main content
Glama

Obtenir les valeurs distinctes

get_field_values
Read-only

List distinct values of a column. Useful to discover values before filtering with _eq or _in.

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": {
      "datasetId": "<datasetId>",
      "fieldKey": "<fieldKey>"
    },
    "name": "get_field_values"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoOptional text to filter values (prefix/substring match within this column)
bboxNoBounding box "lonMin,latMin,lonMax,latMax" (lon before lat), e.g. "-2.5,43,3,47". Geolocalized datasets only.
sizeNoLe nombre de résultats à retourner (taille de la pagination).
sortNoTri des valeurs ("**asc**" ou "**desc**").asc
filtersNoColumn filters { "<column key><suffix>": "<value as a string>" }, e.g. { "ville_eq": "Paris", "age_lte": "30", "nom_search": "Jean" }. Suffixes: _eq _neq _in _nin (comma-separated) _gt _gte _lt _lte _starts _exists _nexists _search (words, the default for text) _contains (when enabled). A rejected suffix answers a 400 listing the column's. Never prefix with _c_.
fieldKeyYesThe column key (use keys from datafair_describe_dataset)
datasetIdYesThe "id" of a datafair_list_account_datasets result, not its title or slug.
dateMatchNoDate "YYYY-MM-DD" (single day) or "YYYY-MM-DD,YYYY-MM-DD" (range), e.g. "2023-11-21". Temporal datasets only.
geoDistanceNoProximity filter "lon,lat,distance" (lon first), e.g. "2.35,48.85,10km"; distance "0" = point-in-polygon. Geolocalized datasets only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / bbox
      Added value: +{
      +  "description": "Bounding box \"lonMin,latMin,lonMax,latMax\" (lon before lat), e.g. \"-2.5,43,3,47\". Geolocalized datasets only.",
      +  "examples": [
      +    "2.2241,48.8156,2.4699,48.9022"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / datasetId / description
      Previous value: -"The exact dataset ID from the \"id\" field in list_datasets results. Do not use the title or slug."New value: +"The \"id\" of a datafair_list_account_datasets result, not its title or slug."
    • addedInput schema / properties / dateMatch
      Added value: +{
      +  "description": "Date \"YYYY-MM-DD\" (single day) or \"YYYY-MM-DD,YYYY-MM-DD\" (range), e.g. \"2023-11-21\". Temporal datasets only.",
      +  "type": "string"
      +}
    • changedInput schema / properties / fieldKey / description
      Previous value: -"The column key to get values for (use keys from describe_dataset)"New value: +"The column key (use keys from datafair_describe_dataset)"
    • addedInput schema / properties / filters
      Added value: +{
      +  "description": "Column filters { \"<column key><suffix>\": \"<value as a string>\" }, e.g. { \"ville_eq\": \"Paris\", \"age_lte\": \"30\", \"nom_search\": \"Jean\" }. Suffixes: _eq _neq _in _nin (comma-separated) _gt _gte _lt _lte _starts _exists _nexists _search (words, the default for text) _contains (when enabled). A rejected suffix answers a 400 listing the column's. Never prefix with _c_.",
      +  "patternProperties": {
      +    ".*": {
      +      "default": "",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / geoDistance
      Added value: +{
      +  "description": "Proximity filter \"lon,lat,distance\" (lon first), e.g. \"2.35,48.85,10km\"; distance \"0\" = point-in-polygon. Geolocalized datasets only.",
      +  "type": "string"
      +}
    • addedInput schema / properties / q
      Added value: +{
      +  "description": "Optional text to filter values (prefix/substring match within this column)",
      +  "maxLength": 1000,
      +  "type": "string"
      +}
    • removedInput schema / properties / query
      Removed value: -{
      -  "description": "Optional text to filter values (prefix/substring match within this column)",
      -  "type": "string"
      -}
    • addedInput schema / properties / size / default
      Added value: +10
    • changedInput schema / properties / size / description
      Previous value: -"Number of values to return (default: 10, max: 1000)"New value: +"Le nombre de résultats à retourner (taille de la pagination)."
    • addedInput schema / properties / size / format
      Added value: +"int32"
    • changedInput schema / properties / size / minimum
      Previous value: -1New value: +0
    • changedInput schema / properties / size / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / sort / default
      Added value: +"asc"
    • changedInput schema / properties / sort / description
      Previous value: -"Sort order for the values (default: asc)"New value: +"Tri des valeurs (\"**asc**\" ou \"**desc**\")."
    • removedInput schema / properties / sort / enum
      Removed value: -[
      -  "asc",
      -  "desc"
      -]
    • addedInput schema / properties / sort / oneOf
      Added value: +[
      +  {
      +    "const": "asc",
      +    "title": "Ascendant"
      +  },
      +  {
      +    "const": "desc",
      +    "title": "Descendant"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "datasetId": {
      -      "description": "The dataset ID that was queried",
      -      "type": "string"
      -    },
      -    "fieldKey": {
      -      "description": "The column key that was queried",
      -      "type": "string"
      -    },
      -    "values": {
      -      "description": "Array of distinct values for the specified column",
      -      "items": {
      -        "type": [
      -          "string",
      -          "number"
      -        ]
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "datasetId",
      -    "fieldKey",
      -    "values"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changed
    • changedInput schema / properties / datasetId / description
      Previous value: -"The exact dataset ID from the \"id\" field in search_datasets results. Do not use the title or slug."New value: +"The exact dataset ID from the \"id\" field in list_datasets results. Do not use the title or slug."
  3. Changed1 schema field changed
    • changedInput schema / properties / datasetId / description
      Previous value: -"The unique dataset ID obtained from search_datasets or provided by the user"New value: +"The exact dataset ID from the \"id\" field in search_datasets results. Do not use the title or slug."
  4. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description's 'List distinct values' is fully consistent with that safety profile. Beyond annotations it adds essentially nothing behavioral: no note on how many values come back by default (size defaults to 10), how ordering works, or that geo/temporal parameters only apply to matching datasets — all of which live in the schema rather than the prose.

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, zero waste, with the core operation stated first and the practical workflow hint second. Nothing is padded or restated from the title.

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?

There is no output schema, so the description ideally would say what distinct values look like when returned (plain value list, counts, ordering) — it does not. For a nine-parameter tool with nested filters and geo/temporal options, the prose is thin, though the fully documented schema carries most of the load.

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

Parameters3/5

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

Schema description coverage is 100%, so every one of the nine parameters is already documented in detail, including the filter suffix vocabulary and bbox/dateMatch formats. The description only echoes '_eq or _in' from the filter suffix list and adds no format, default, or interaction semantics of its own, so the baseline 3 applies.

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?

The description opens with a specific verb and resource: 'List distinct values of a column,' which is precise and immediately distinguishes it from aggregate_data, search_data, or calculate_metric. It does not explicitly name a sibling it contrasts with, so it falls short of a 5, but the operation is unambiguous.

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

Usage Guidelines4/5

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

It gives a concrete workflow cue — use this to discover values before filtering with _eq or _in — which tells the agent when this tool is the right first step. It lacks explicit when-not guidance or named alternatives (e.g., using search_data for full rows), so it is clear context but not complete routing.

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.

Resources