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 and ends before a row that would take its row JSON past 4,000,000 characters (the page character ceiling); 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. BIGINT values, such as the staged ac and an counts and COUNT(*), arrive as JSON strings to keep their precision; CAST(col AS INTEGER) returns a number. 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.

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

Input Schema

NameRequiredDescriptionDefault
sqlYesRead-only SQL SELECT, naming tables as the staging tool returned them (e.g. gene_variants).
limitNoMaximum rows on the page. Default 25; a value above 3,000 is clamped to 3,000, with a notice.
offsetNoRow offset of the page; pass next_offset from the previous page.
canvas_idYesCanvas ID returned by gnomad_list_gene_variants or gnomad_search_clinvar.

Output Schema

NameRequiredDescriptionDefault
rowsNoThis page of result rows, in result order.
errorNoPresent when the call failed. Absent on success.
totalNoRows the SQL produced; null above the server row cap.
noticeNoSet when limit was above its cap: the requested and applied values.
offsetNoRow offset this page starts at.
columnsNoColumn names in the result, in order.
returnedNoRows on this page — fewer than limit when the end of the result, the row cap, or the page character ceiling 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 at the end of the result or the row cap.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum rows on the page. A page also ends before a row that would take its row JSON past 4,000,000 characters. Default 25; a value above 3,000 is clamped to 3,000, with a notice."New value: +"Maximum rows on the page. Default 25; a value above 3,000 is clamped to 3,000, with a notice."
    • changedInput schema / properties / offset / description
      Previous value: -"Row offset of the page to return. Start at 0, then pass next_offset from the previous page."New value: +"Row offset of the page; pass next_offset from the previous page."
    • changedInput schema / properties / sql / description
      Previous 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."New value: +"Read-only SQL SELECT, naming tables as the staging tool returned them (e.g. gene_variants)."
    • 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. `row_too_large`: The first row of the requested page serializes to more than 4,000,000 characters of JSON, so no page can hold it. 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 alone exceeds the page character ceiling. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / next_offset / description
      Previous value: -"offset for the next page; null when no page follows (end of the result, or the row cap reached)."New value: +"offset for the next page; null at the end of the result or the row cap."
    • changedOutput schema / properties / returned / description
      Previous value: -"Rows on this page — fewer than limit when the end of the result, the row cap, or the 4,000,000-character row-JSON ceiling ends it early."New value: +"Rows on this page — fewer than limit when the end of the result, the row cap, or the page character ceiling ends it early."
    • changedOutput schema / properties / total / description
      Previous value: -"Rows the SQL produced; null when the result exceeds the server row cap, whose later rows paging cannot reach."New value: +"Rows the SQL produced; null above the server row cap."
  2. Changed8 schema fields changed
    • changedInput schema / properties / limit / default
      Previous value: -100New value: +25
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum rows on the page (1–500). A page also ends before its rows pass 10,000 characters of JSON."New value: +"Maximum rows on the page. A page also ends before a row that would take its row JSON past 4,000,000 characters. Default 25; a value above 3,000 is clamped to 3,000, with a notice."
    • removedInput schema / properties / limit / maximum
      Removed value: -500
    • addedInput schema / properties / limit / multipleOf
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"integer"New value: +"number"
    • 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. `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."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 4,000,000 characters of JSON, so no page can hold it. Other values are possible when a failure originates below the handler."
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Set when limit was above its cap: the requested and applied values.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / returned / description
      Previous value: -"Rows on this page — fewer than limit when the 10,000-character row budget or the end of the result ends it early."New value: +"Rows on this page — fewer than limit when the end of the result, the row cap, or the 4,000,000-character row-JSON ceiling ends it early."
  3. 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."
  4. 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}$"
  5. 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 readOnly/idempotent/closed-world; the description goes well beyond by disclosing the 4,000,000-character page ceiling, next_offset continuation paging, that each page re-runs the SQL so stable paging requires an ORDER BY over a unique key, the server row cap behavior where total becomes null, and that BIGINT columns arrive as JSON strings with a CAST workaround.

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-loaded with the core action and the table mapping, then paging, then type/restriction caveats — a sensible information order despite the density. It is long for a description, but nearly every sentence carries operational detail an agent would otherwise have to discover by error.

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?

For a SQL-paging tool with annotations and an output schema present, the description covers the remaining gaps an agent would hit: paging termination, ordering stability, row cap, type coercion, and write rejection. Nothing needed to invoke it correctly appears 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%, so the schema baseline is 3. The description still adds value by tying canvas_id/table_name to the tools that produced them and by explaining why a page may end early (the character ceiling), which clarifies the interaction between limit and offset in a way the schema alone does not.

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 staged canvas table and return one page of results. It names the exact tables (gene_variants, clinvar_variants) and which sibling staged each, so an agent can separate it from gnomad_dataframe_describe and the staging tools.

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 explicit use cases (rank by allele frequency, group by consequence, count LoF variants, filter the full set the inline preview only sampled) and a prerequisite sequencing instruction: call gnomad_dataframe_describe first to discover tables and columns. It also declares the exclusion boundary — SELECT only, writes/DDL/file and HTTP table functions are rejected.

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.