Skip to main content
Glama

Query Data Sets

dataset_query
Read-only

Run a read-only SQL query against cached Data Set tables you can use (your own or any shared with you). Reference tables by their cached table name (from dataset_list/dataset_get). Only the datasets schema is accessible; a single SELECT statement is allowed and results are capped at 5000 rows.

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

Input Schema

NameRequiredDescriptionDefault
sqlYesRead-only SQL against the datasets schema

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds genuinely new behavioral context beyond them: only a single SELECT is permitted, the accessible schema is restricted to 'datasets', and results are capped at 5000 rows.

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?

Three tight sentences with no filler; the core action leads, followed by table-referencing instructions and the key constraints. Every clause carries information an agent needs before invoking the tool.

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 one parameter, full schema coverage, and safety annotations present, the description covers scope, allowed statement form, table naming, and the row cap. Only minor details such as column naming or error behavior on invalid SQL are unaddressed, which is acceptable given no output schema exists.

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

Parameters4/5

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

Schema coverage is 100% and there is only one parameter, so the baseline is already high. The description still adds meaning beyond the schema by explaining which tables the SQL may reference, where their names come from, and that statements are limited to a single SELECT.

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?

States a specific verb and resource ('Run a read-only SQL query against cached Data Set tables') plus the access scope (own or shared with you). It does not differentiate itself from the sibling postgres_query, which also runs SQL, so an agent must infer the distinction from the 'cached Data Set tables' / 'datasets schema' wording.

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 clear operational guidance: reference tables by cached table name obtained from dataset_list/dataset_get, and only the datasets schema is reachable. It stops short of explicitly stating when to prefer this over postgres_query or postgres_execute, leaving the sibling choice implicit.

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