Skip to main content
Glama

Query dataset rows

query_dataset

Read and filter rows from Kazakhstan's official open datasets by field values, free-text search, selected fields, paging, and sorting to answer data questions.

Instructions

Read rows of a dataset, optionally filtered.

Args: dataset: Dataset index, e.g. "mektepter_tizimi". version: Version ("v1"…). Defaults to the latest. filters: Field → value (full-text match on that field, all words must match), e.g. {"name": "Арыс"}. A list of values means "any of them". text: Free-text search across all fields. fields: Only return these fields (default: all). limit: Rows to return (1–500). offset: Rows to skip, for paging. sort_by: Field to sort by (sorting is lexical for text fields). sort_order: "asc" or "desc". es_query: Advanced: a raw Elasticsearch 1.x "query" object; replaces filters/text.

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": "<dataset>"
    },
    "name": "query_dataset"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNo
limitNo
fieldsNo
offsetNo
datasetYes
filtersNo
sort_byNo
versionNo
es_queryNo
sort_orderNoasc

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: it discloses defaults (latest version, all fields, default paging), the 1–500 limit range (absent from the schema), that sorting is lexical for text fields, and that es_query overrides filters/text. It does not state permission requirements or the risk of raw Elasticsearch 1.x queries, which would have been valuable for a mutation-adjacent escape hatch.

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

Conciseness4/5

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

The summary sentence is front-loaded and the per-argument list is dense with no filler. The docstring-style "Args:" formatting is slightly verbose for a tool description but is well structured and scannable rather than padded.

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

Completeness4/5

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

For a 10-parameter read tool with no annotations but an existing output schema, the description covers defaults, ranges, and override behavior sufficiently to invoke it correctly. Missing pieces are secondary: permission expectations and what happens on invalid dataset/version values.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate entirely, and it does: it explains filter semantics (full-text match on the field, all words must match, list means any-of), gives a concrete dataset naming example, defines the limit range, offset paging, sort_by lexical behavior, sort_order values, and the replace-semantics of es_query. Every one of the 10 parameters gains meaning not present in the bare schema.

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: "Read rows of a dataset, optionally filtered." That is unambiguous against siblings like aggregate_dataset, get_dataset_info, and search_datasets, though it never explicitly names or contrasts them.

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?

There is no explicit statement of when to use this versus search_datasets or aggregate_dataset; usage must be inferred from the verb "Read rows." The one piece of genuine routing guidance is internal — es_query "replaces filters/text" — which tells the agent how to choose among parameters but not among tools.

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