Skip to main content
Glama

Read rows of a callable table

query_data
Read-onlyIdempotent

Read rows of one table (plus up to three joined tables) with filters, ordering and keyset paging. Values come back as released by the publisher (value_layer). Each of columns is [name, type, has Refused / Don't know codes]; labels, units and codes are in describe_data. Returns data_available: false with the quoted terms when the dataset may not be passed on; never retry a refusal with other arguments. For a whole table use get_data_file.

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": {
      "slug": "<slug>",
      "table": "<table>"
    },
    "name": "query_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
joinNoOne table, or 1-3 tables, each joined to table along a declared relation (describe_data relations). Every row of table is kept; columns of a joined table are named <join>.<col>.
langNoen
slugYes
hintsNo
limitNo
tableYes
whereNoAll conditions must hold (AND).
cursorNonext_cursor from the previous response.
columnsNoDefault: the table's default_columns. Primary key columns are always returned first. With join: <join>.<col> names a column of the joined table.
versionNo
order_byNo
recode_naNotrue: each column's own Refused / Don't know codes (na_codes) become null before filtering and in the rows.
max_tokensNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / join / anyOf
      Added value: +[
      +  {
      +    "pattern": "^[a-z][a-z0-9_]{0,62}$",
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "pattern": "^[a-z][a-z0-9_]{0,62}$",
      +      "type": "string"
      +    },
      +    "maxItems": 3,
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / join / description
      Previous value: -"One more table, joined along a declared relation (describe_data relations). Every row of table is kept; columns of the joined table are named <join>.<col>."New value: +"One table, or 1-3 tables, each joined to table along a declared relation (describe_data relations). Every row of table is kept; columns of a joined table are named <join>.<col>."
    • removedInput schema / properties / join / pattern
      Removed value: -"^[a-z][a-z0-9_]{0,62}$"
    • removedInput schema / properties / join / type
      Removed value: -"string"
  2. Added

TDQS

A3.9/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 the description adds genuinely non-obvious behavior: values are released per the publisher (value_layer), and a dataset can return data_available: false with quoted terms, which must not be retried with other arguments. It stops short of describing paging limits, token budgeting or what happens when joins reference undeclared relations.

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?

Four tight sentences, front-loaded with the core operation before the edge cases and the sibling pointer. Density is high with little waste, though parenthetical jargon like "(value_layer)" costs a clause of clarity for little gain.

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?

With 13 parameters, an output schema and multiple edge cases, the description covers the highest-risk behaviors: refusals, no-retry policy, join limits and column shape. It is not fully complete for the undocumented operational parameters, but the safety-critical surface is covered.

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 coverage is only 38%, so the description does have to compensate: it clarifies join cardinality (up to three tables), keyset paging via cursor, that columns are [name, type, has Refused/Don't know codes], and that join columns are named <join>.<col>. It adds nothing for version, hints, lang, max_tokens or recode_na, which is a real gap at this coverage level.

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

Purpose5/5

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

States a specific verb and resource ("Read rows of one table (plus up to three joined tables)") and enumerates the capabilities involved: filters, ordering and keyset paging. It also explicitly separates itself from get_data_file (whole table) and describe_data (labels, units, codes), so an agent can route without opening any schema.

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?

Gives one explicit alternative with its selecting condition: "For a whole table use get_data_file." It also issues a hard usage rule for the refusal case ("never retry a refusal with other arguments"). It does not say when to prefer this over search_content or when to call describe_data first, so guidance is strong but not exhaustive.

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.