Skip to main content
Glama

gnomad-genetics-mcp-server

gnomad-genetics-mcp-server: dataframe query

gnomad_dataframe_query
Read-onlyIdempotent

Run a read-only SQL SELECT against a canvas table staged by gnomad_list_gene_variants (table gene_variants) or gnomad_search_clinvar (table clinvar_variants) and return one page of the result. Use the canvas_id and table_name those tools returned to rank by allele frequency, group by consequence class, count loss-of-function variants, or filter the full set the inline preview only sampled. A page holds up to limit rows (default 100, max 500) and ends early once its rows reach 10,000 characters of JSON; continue from next_offset until it is null. Each page re-runs the SQL, so stable paging needs an ORDER BY over a unique key (such as variant_id) and an unchanged table. Paging reaches the server row cap: above it total is null and later rows are reachable only by filtering or aggregating in SQL. SELECT statements only — writes, DDL, and file/HTTP table functions are rejected by the canvas gate. Call gnomad_dataframe_describe first to discover staged table and column names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesRead-only SQL SELECT. Reference tables by the names the staging tool returned (e.g. gene_variants). Add an ORDER BY over a unique key when paging.
limitNoMaximum rows on the page (1–500). A page also ends before its rows pass 10,000 characters of JSON.
offsetNoRow offset of the page to return. Start at 0, then pass next_offset from the previous page.
canvas_idYesCanvas ID returned by gnomad_list_gene_variants or gnomad_search_clinvar.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoThis page of result rows, in result order.
errorNoPresent when the call failed. Absent on success.
totalNoRows the SQL produced; null when the result exceeds the server row cap, whose later rows paging cannot reach.
offsetNoRow offset this page starts at.
columnsNoColumn names in the result, in order.
returnedNoRows on this page — fewer than limit when the 10,000-character row budget or the end of the result ends it early.
truncatedNoTrue when result rows exist after this page, including rows past the row cap that next_offset cannot reach.
next_offsetNooffset for the next page; null when no page follows (end of the result, or the row cap reached).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "description": "Maximum rows on the page (1–500). A page also ends before its rows pass 10,000 characters of JSON.",
      +  "maximum": 500,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Row offset of the page to return. Start at 0, then pass next_offset from the previous page.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / sql / description
      Previous value: -"Read-only SQL SELECT. Reference tables by the names the staging tool returned (e.g. gene_variants)."New value: +"Read-only SQL SELECT. Reference tables by the names the staging tool returned (e.g. gene_variants). Add an ORDER BY over a unique key when paging."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "rows",
      -      "row_count",
      -      "columns",
      -      "truncated"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "rows",
      +      "columns",
      +      "offset",
      +      "returned",
      +      "total",
      +      "truncated",
      +      "next_offset"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is not enabled on this server instance. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is not enabled on this server instance. `row_too_large`: The first row of the requested page serializes to more than 10,000 characters of JSON, so no page can hold it. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "canvas_disabled"
      -]New value: +[
      +  "canvas_disabled",
      +  "row_too_large"
      +]
    • addedOutput schema / properties / next_offset
      Added value: +{
      +  "description": "offset for the next page; null when no page follows (end of the result, or the row cap reached).",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / offset
      Added value: +{
      +  "description": "Row offset this page starts at.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / returned
      Added value: +{
      +  "description": "Rows on this page — fewer than limit when the 10,000-character row budget or the end of the result ends it early.",
      +  "type": "number"
      +}
    • removedOutput schema / properties / row_count
      Removed value: -{
      -  "description": "Number of rows the query produced (materialized count).",
      -  "type": "number"
      -}
    • changedOutput schema / properties / rows / description
      Previous value: -"Result rows (dynamic columns per the SQL projection), capped at the canvas row limit."New value: +"This page of result rows, in result order."
    • addedOutput schema / properties / total
      Added value: +{
      +  "description": "Rows the SQL produced; null when the result exceeds the server row cap, whose later rows paging cannot reach.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when the result exceeded the row cap and was clipped."New value: +"True when result rows exist after this page, including rows past the row cap that next_offset cannot reach."
  2. Changed2 schema fields changed
    • removedInput schema / properties / canvas_id / minLength
      Removed value: -1
    • addedInput schema / properties / canvas_id / pattern
      Added value: +"^[A-Za-z0-9_-]{10}$"
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint, idempotentHint and openWorldHint=false; the description goes well beyond by disclosing the 10,000-character page cutoff, that each page re-runs the SQL so stable paging requires ORDER BY over a unique key, that row caps make total null, and that a canvas gate rejects non-SELECT statements. These are the exact operational traits an agent needs to page correctly.

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?

Front-loads the core action and staging tools, then layers paging rules in descending priority; no sentence is wasted. Slightly long and repeats the limit default/max already in the schema, costing a bit of tightness.

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?

An output schema exists, so return values need no explanation, yet the description still covers the pagination contract (next_offset, early termination, row cap) that governs how the agent should loop. Nothing needed to call it correctly is missing.

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% (baseline 3), and the description adds meaning beyond it: it ties offset to next_offset continuation, restates the default/max limit behavior in a paging context, and explains the ORDER BY unique-key requirement for stable paging. Minor overlap with schema text keeps it below 5.

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 ('Run a read-only SQL SELECT against a canvas table') and names the exact staging tools and table names (gene_variants, clinvar_variants) that produce the input. An agent can distinguish it from the sibling staging tools and from gnomad_dataframe_describe 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 Guidelines5/5

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

Gives concrete when-to-use cases (rank by allele frequency, group by consequence, count LoF variants, filter beyond the inline preview) and explicitly routes the agent to call gnomad_dataframe_describe first. It also states what is not allowed (writes, DDL, file/HTTP table functions), which is a genuine exclusion.

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.