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 25, capped at 3,000) and ends before a row that would take its row JSON past 4,000,000 characters; 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. 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. 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.
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

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.
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 4,000,000-character row-JSON 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 when no page follows (end of the result, or the row cap reached).

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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."
  3. 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}$"
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint=false and the description is consistent with them, while adding substantial non-structured behavior: page caps (limit default 25, clamped at 3,000), the 4,000,000-character row-JSON page break, next_offset continuation, re-execution of SQL per page requiring ORDER BY over a unique key for stable paging, and the server row cap where total becomes null. It even discloses the result encoding quirk where BIGINT values (ac, an, COUNT(*)) arrive as JSON strings and CAST(col AS INTEGER) yields a number.

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 sibling tools, then layers paging, caps, and type-encoding caveats. Every sentence carries distinct information, but the paragraph is long and dense; the BIGINT/CAST note and the row-cap note could be tightened without losing meaning.

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?

Covers everything an agent needs to invoke it correctly for a paged SQL tool: prerequisites, table naming, paging continuation, ordering requirements, hard caps, SQL restrictions, and value encoding. Since an output schema exists, omitting a description of return shape is appropriate.

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 baseline is 3, but the description adds operative meaning beyond the schema: canvas_id must come from the named staging tools, and the sql parameter should include an ORDER BY over a unique key such as variant_id when paging. The limit/offset semantics are largely restated from the schema rather than extended.

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 siblings that stage each table (gnomad_list_gene_variants → gene_variants, gnomad_search_clinvar → clinvar_variants). An agent can distinguish it from the staging and describe tools 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 scenarios (rank by allele frequency, group by consequence class, count LoF variants, filter the full set that the inline preview only sampled) and an explicit prerequisite ('Call gnomad_dataframe_describe first'). It also states the boundary condition that SELECT-only is enforced and writes, DDL, and file/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.