Skip to main content
Glama

Run SQL over the dataset

query_dataset
Read-onlyIdempotent

Run read-only DuckDB SELECTs over the dataset behind the other tools, for a question none of them asks. Call describe_dataset first; it lists the 29 views, their columns, joins and recipes. Prefer a typed tool when one fits.

  • statements=[…]: up to 5 statements in one call, one result or error each.

  • Result: columns, and rows as arrays, up to max_rows (≤ 500, default 100) and 16 KB. When truncated is true: aggregate, filter, or use LIMIT and OFFSET. One SELECT (or SHOW, DESCRIBE, FROM-first), no semicolon, 15 s limit, nothing outside the bundle.

  • Dev-branch isolation: JOIN contrib_branch and filter kind = 'dev_branch' AND project <> 'drupal' before counting projects. change_record_adoption, symbol_usage and core_symbol_evidence hold release tags too. core_symbol_evidence is the full rollup; symbol_usage is its string-scan subset.

  • Adoption polarity: legacy is still on the old API (not adopted); migrated is adopted. Versions are text: compare _seq integers (major1000+minor). Never SUM(usage) across branch rows.

  • Errors list the views, the columns of the views you used, or the join map. An empty result over an fqn without a leading backslash gets a hint.

  • The same views are downloadable as parquet under https://api.tresbien.tech/data/docs. Its cookbook targets api.duckdb plus prelude views this mirror does not have, so take recipes from describe_dataset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlNoOne DuckDB SELECT over the views describe_dataset lists. SHOW TABLES, DESCRIBE <view> and FROM-first syntax also work. No semicolon, one statement. Use statements for several at once.
max_rowsNoRows to return per statement, 1 to 500 (default 100). The result byte budget may cut a wide result sooner. truncated says so either way.
statementsNoUp to 5 statements in one call. Results come back in order under results, each with its own rows or error. The byte budget is shared. Use this instead of sql for more than one statement.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changed
    • changedInput schema / properties / max_rows / description
      Previous value: -"Rows to return per statement, 1 to 500 (default 100). The result byte budget may cut a wide result sooner; truncated says so either way."New value: +"Rows to return per statement, 1 to 500 (default 100). The result byte budget may cut a wide result sooner. truncated says so either way."
    • changedInput schema / properties / sql / description
      Previous value: -"One DuckDB SELECT over the views listed in the description. SHOW TABLES, DESCRIBE <view> and FROM-first syntax also work. No semicolon; one statement. Use statements for several at once."New value: +"One DuckDB SELECT over the views describe_dataset lists. SHOW TABLES, DESCRIBE <view> and FROM-first syntax also work. No semicolon, one statement. Use statements for several at once."
    • changedInput schema / properties / statements / description
      Previous value: -"Up to 5 statements run in one call (explore in one round trip): results come back in order under results, each with its own rows or error; the byte budget is shared. Use instead of sql when you have more than one."New value: +"Up to 5 statements in one call. Results come back in order under results, each with its own rows or error. The byte budget is shared. Use this instead of sql for more than one statement."
  2. Changed5 schema fields changed
    • changedInput schema / properties / max_rows / description
      Previous value: -"Rows to return, 1 to 500 (default 100). The result byte budget may cut a wide result sooner; truncated says so either way."New value: +"Rows to return per statement, 1 to 500 (default 100). The result byte budget may cut a wide result sooner; truncated says so either way."
    • changedInput schema / properties / sql / description
      Previous value: -"One DuckDB SELECT over the views listed in the description. SHOW TABLES, DESCRIBE <view> and FROM-first syntax also work. No semicolon; one statement."New value: +"One DuckDB SELECT over the views listed in the description. SHOW TABLES, DESCRIBE <view> and FROM-first syntax also work. No semicolon; one statement. Use statements for several at once."
    • addedInput schema / properties / statements
      Added value: +{
      +  "description": "Up to 5 statements run in one call (explore in one round trip): results come back in order under results, each with its own rows or error; the byte budget is shared. Use instead of sql when you have more than one.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • removedInput schema / required
      Removed value: -[
      -  "sql"
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "columns": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "name": {
      -            "type": "string"
      -          },
      -          "type": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "name",
      -          "type"
      -        ],
      -        "type": "object"
      -      },
      -      "type": [
      -        "null",
      -        "array"
      -      ]
      -    },
      -    "hint": {
      -      "type": "string"
      -    },
      -    "row_count": {
      -      "type": "integer"
      -    },
      -    "rows": {
      -      "items": {
      -        "items": true,
      -        "type": [
      -          "null",
      -          "array"
      -        ]
      -      },
      -      "type": [
      -        "null",
      -        "array"
      -      ]
      -    },
      -    "truncated": {
      -      "type": "boolean"
      -    }
      -  },
      -  "required": [
      -    "columns",
      -    "rows",
      -    "row_count",
      -    "truncated"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changed
    • addedOutput schema / properties / hint
      Added value: +{
      +  "type": "string"
      +}
  4. Added

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, and the description substantially extends this with execution behavior: 15-second timeout, no statement outside the bundle, shared byte budget, truncation flag, dev-branch isolation, adoption polarity, and empty-result hints. This is far beyond what the annotations alone convey.

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 description is long but dense and well-structured: a front-loaded purpose sentence, then bulleted operational sections covering result format, isolation rules, polarity pitfalls, error behavior, and external resources. Every section conveys necessary constraints for correct invocation; there is no filler or repetition.

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?

Despite having no output schema, the description explains the result shape, truncation condition, error behavior, view inventory via describe_dataset, domain-specific adoption polarity, and dev-branch filtering. This is complete enough for an agent to invoke the tool correctly on complex analytical questions.

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 100%, so the baseline is 3, but the description adds substantial parameter semantics: statements limits of 5 and per-statement results/errors, max_rows cap of 500 with shared 16 KB budget, one SELECT/SHOW/DESCRIBE/FROM-first per statement, no semicolon, and LIMIT/OFFSET guidance on truncation. This meaningfully enriches the schema definitions.

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?

The description opens with a specific verb and resource: 'Run read-only DuckDB SELECTs over the dataset behind the other tools, for a question none of them asks.' It explicitly frames the tool as a complement to the sibling tools and tells the agent to prefer a typed tool when one fits, making sibling differentiation clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit usage guidance: call describe_dataset first, prefer a typed tool when one fits, and use this tool for questions none of the other tools ask. It also details constraints such as 'no semicolon' and using statements for multiple queries, giving clear when-to-use and how-to-use context.

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.

TDQS

A4.6/5.0
Disambiguation4/5

Tools cluster into related families (change records, symbol usage, patch checks), but descriptions and cross-references clearly separate list vs detail vs diff operations. Some adjacent tools like lookup_core_symbol and list_symbol_users require careful reading, yet their purposes are distinct enough for an agent to select correctly.

Naming Consistency4/5

Most tools follow a clear snake_case verb_noun pattern: list_*, get_*, lookup_*, query_, scan_, search_, reroll_, describe_. A few names like project_profile, subsystem_coupling, and what_changed deviate from verb_noun but remain consistent in style and readable.

Tool Count4/5

At 16 tools, the set is slightly above the typical well-scoped range, but the domain is broad: patch lifecycle, composer scanning, symbol lookup, change records, project profiles, dataset queries, and code search. Each tool covers a distinct query surface, so none feels redundant.

Completeness5/5

The toolkit covers the full read-only analysis lifecycle: scanning composer constraints, checking and re-rolling patches, exploring datasets, looking up core symbols and their users, listing change records, profiling projects, and assessing upgrade readiness. No obvious dead ends or missing operations for its stated purpose.

Resources