Skip to main content
Glama

Query rows

query_rows
Read-onlyIdempotent

Return matching rows. Filter with where, choose columns with select, sort with order_by. Columns of linked datasets work as alias.column. At most 1,000 rows; page with offset.

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

Input Schema

NameRequiredDescriptionDefault
limitNo
whereNo
offsetNo
selectNo
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.
order_byNo
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 readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds the non-obvious operational facts that a single call caps at 1,000 rows and that paging is done with offset, which is genuinely useful context. It says nothing about return shape or what happens at the boundary beyond the cap.

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?

Four short sentences, each doing distinct work: purpose, the three shaping parameters, the cross-dataset join syntax, and the row cap with paging. Nothing is repeated from the schema verbatim and the most important constraint is stated last but briefly.

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 7-parameter query tool with no output schema, the definition covers purpose, the shaping parameters, join syntax and the row cap. The remaining gap is the return shape (rows and any meta/stale information), which the schema's version parameter hints at but the description never states.

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?

With schema description coverage at 29%, the description has to carry meaning, and it does add syntax the schema lacks: linked-dataset columns are referenced as alias.column. It also names where/select/order_by/offset roles. But limit, version and the filter operators (relative dates, between, contains) are left entirely to the schema, so compensation is partial.

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+resource ('Return matching rows') and enumerates the main query capabilities (where, select, order_by), so an agent knows this is the raw row-retrieval tool. It does not explicitly contrast itself with siblings like aggregate or distinct_values, which keeps it short of a 5.

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?

Usage is implied by the capability list: use where to filter, select to project, order_by to sort, offset to page. There is no explicit when-to-use/when-not guidance and no pointer to aggregate or distinct_values as alternatives, so the agent must infer the choice from sibling names.

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.