Skip to main content
Glama

Misata Studio: verified synthetic data

Query a dataset with SQL

query_dataset
Read-onlyIdempotent
Read-only SQL over a dataset's own tables (one SELECT/WITH statement; every table name is a view
over that dataset's own files — nothing else on the server is reachable this way).

Args:
    dataset_id: from a prior generate_dataset call.
    sql:        a single SELECT (or WITH ... SELECT) statement. No semicolons, file paths, or
                statements that write or read outside the dataset (checked before running).
    limit:      rows returned, 1 to 5000 (1000 when not given).

Returns:
    columns, rows, truncated (whether more rows existed than `limit`). A query that does not run says why, with
    the dataset's `tables` and their columns to write it against.

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

Input Schema

NameRequiredDescriptionDefault
sqlYes
limitNo
dataset_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / limit / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / limit / type
      Removed value: -"integer"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/closed-world, yet the description adds real behavior: the SQL is validated before running, writes and out-of-dataset reads are rejected, the limit is capped at 5000 with a default of 1000, and failures return the dataset's tables and columns. Truncation semantics are disclosed, which matters for pagination decisions.

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?

The scope constraint is front-loaded in the first sentence, then Args and Returns are cleanly sectioned with no filler. The only near-redundancy is restating the 1000 default already in the schema, which is trivial and aids scanning.

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

Completeness5/5

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

With no output schema, the description supplies the return shape (columns, rows, truncated) and describes the error payload. Combined with the validation and limit rules, an agent has everything needed to compose and interpret a call.

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 coverage is 0%, so the description carries the full burden and does: dataset_id's provenance is explained, sql's accepted grammar and rejected forms are spelled out, and limit's range and default are given. All three parameters gain meaning beyond their JSON types.

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+resource ('Read-only SQL over a dataset's own tables') and immediately bounds the scope: one SELECT/WITH statement, views over that dataset's own files, nothing else on the server reachable. An agent can tell this apart from generate_dataset/export_dataset without reading 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 concrete usage preconditions: dataset_id must come from a prior generate_dataset call, exactly one SELECT/WITH statement, no semicolons or file paths. It also states a when-not implicitly ('nothing else on the server is reachable this way'). It stops short of naming an explicit alternative (e.g. export_dataset) for pulling rows out, so it is not a full 5.

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