Skip to main content
Glama

gnomad-genetics-mcp-server

gnomad-genetics-mcp-server: get variant cooccurrence

gnomad_get_variant_cooccurrence
Read-onlyIdempotent

Estimate whether two variants in the same gene sit on different haplotypes (in trans — compound heterozygous) or on the same one (in cis), from gnomAD v2.1 exome genotypes: the probability of compound heterozygosity and the genotype and haplotype counts behind it, overall and per genetic-ancestry group. For a proband with two rare heterozygous variants in a recessive gene and no parental samples. Takes exactly two GRCh37 chrom-pos-ref-alt IDs and always reads gnomad_r2_1, the only dataset gnomAD serves co-occurrence for. A GRCh38 ID can name a different GRCh37 variant or none, so convert GRCh38 IDs first: gnomad_get_variant on dataset gnomad_r2_1 lists their GRCh37 IDs as candidates only when the ID fails there as variant_not_found_other_build; an ID gnomad_r2_1 finds returns a different variant. gnomAD answers only for two different coding or UTR variants of one gene, both in its exome samples with exome allele frequency of 5% or less; any other pair fails as cooccurrence_unavailable with gnomAD's reason. Every count key names variant_ids[0]'s genotype or allele first and variant_ids[1]'s second, and variant_ids can list the pair in another order than sent. The notice carries gnomAD's calibration caveat and its browser's reading of the probability. gnomAD's browser also notes when the pair is found in phase as a multi-nucleotide variant; this tool does not check for one. Data source: gnomAD (Broad Institute) — https://gnomad.broadinstitute.org/

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": {
      "variants": "<variants>"
    },
    "name": "gnomad_get_variant_cooccurrence"
  }
}

Input Schema

NameRequiredDescriptionDefault
variantsYesThe two variants to phase, in any order.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNognomAD's calibration caveat and its browser's reading of the probability for this pair; when no sample carries both variants, also that the counts come from each variant's separate data and miss samples not covered at both sites.
datasetNoDataset the counts come from.
populationsNoThe same counts per genetic-ancestry group, in gnomAD's order.
variant_idsNoThe pair in gnomAD's order, which labels every count.
genotype_countsNoSamples per genotype pair: ref (homozygous reference), het (heterozygous), hom (homozygous alternate).
haplotype_countsNognomAD's estimated haplotype counts per allele pair, fractional where samples heterozygous for both variants leave the phase to its EM estimate.
reference_genomeNoReference build of variant_ids.
p_compound_heterozygousNoEstimated probability that the two variants lie on different haplotypes (in trans, compound heterozygous). Null when gnomAD computes none, as when either variant has no carrier among these samples — never read null as 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed38 schema fields changed
    • changedInput schema / properties / variants / description
      Previous value: -"The two variants to phase, as GRCh37 chrom-pos-ref-alt IDs. Order does not matter: variant_ids in the output gives the order the counts use."New value: +"The two variants to phase, in any order."
    • changedOutput schema / properties / dataset / description
      Previous value: -"Dataset the counts come from — always gnomad_r2_1, the only one gnomAD serves co-occurrence for."New value: +"Dataset the counts come from."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_variant_id`: A variant is not a chrom-pos-ref-alt ID on chromosome 1–22, X, or Y — an rsID included, since co-occurrence takes coordinate IDs. `mitochondrial_unsupported`: A variant ID names the mitochondrial chromosome (M, MT, or chrM). `cooccurrence_unavailable`: gnomAD refused the pair: the same variant twice, a variant absent from gnomAD v2.1 (as a GRCh38 ID usually is), variants in different genes or outside coding and UTR sequence, a variant with no exome call, or one with exome allele frequency above 5%. The message is gnomAD's reason. `graphql_error`: gnomAD rejected the co-occurrence query with a GraphQL error other than a refusal of the pair. `upstream_unavailable`: gnomAD stayed unavailable or throttled through every retry. `upstream_timeout`: gnomAD attempts timed out or the shared 45 s call budget expired. `upstream_access`: gnomAD refused the request (access denied). `invalid_upstream_response`: gnomAD kept answering with a response that failed validation — counts of the wrong shape, or variant_ids naming a pair other than the one sent. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_variant_id`: A variant is not a chrom-pos-ref-alt ID on chromosome 1–22, X, or Y — an rsID included, since co-occurrence takes coordinate IDs. `mitochondrial_unsupported`: A variant ID names the mitochondrial chromosome (M, MT, or chrM). `cooccurrence_unavailable`: gnomAD refused the pair — the same variant twice, one absent from gnomAD v2.1 (as a GRCh38 ID usually is), different genes, a variant outside coding and UTR sequence, or one with no exome call or a common exome frequency; the message is gnomAD's reason. `graphql_error`: gnomAD rejected the co-occurrence query with a GraphQL error other than a refusal of the pair. `upstream_unavailable`: gnomAD stayed unavailable or throttled through every retry. `upstream_timeout`: gnomAD attempts timed out or the shared 45 s call budget expired. `upstream_access`: gnomAD refused the request (access denied). `invalid_upstream_response`: gnomAD kept answering with a response that failed validation — counts of the wrong shape, or variant_ids naming a pair other than the one sent. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / genotype_counts / description
      Previous value: -"Samples per genotype pair. Each key names variant_ids[0]'s genotype first and variant_ids[1]'s second: ref (homozygous reference), het (heterozygous), hom (homozygous alternate)."New value: +"Samples per genotype pair: ref (homozygous reference), het (heterozygous), hom (homozygous alternate)."
    • changedOutput schema / properties / genotype_counts / properties / het_het / description
      Previous value: -"Samples heterozygous for both variants — the carriers whose phase the probability estimates."New value: +"Samples heterozygous for both — the carriers whose phase is estimated."
    • changedOutput schema / properties / genotype_counts / properties / het_hom / description
      Previous value: -"Samples heterozygous for variant_ids[0] and homozygous alternate for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / genotype_counts / properties / het_ref / description
      Previous value: -"Samples heterozygous for variant_ids[0] and homozygous reference for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / genotype_counts / properties / hom_het / description
      Previous value: -"Samples homozygous alternate for variant_ids[0] and heterozygous for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / genotype_counts / properties / hom_hom / description
      Previous value: -"Samples homozygous alternate for variant_ids[0] and for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / genotype_counts / properties / hom_ref / description
      Previous value: -"Samples homozygous alternate for variant_ids[0] and homozygous reference for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / genotype_counts / properties / ref_het / description
      Previous value: -"Samples homozygous reference for variant_ids[0] and heterozygous for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / genotype_counts / properties / ref_hom / description
      Previous value: -"Samples homozygous reference for variant_ids[0] and homozygous alternate for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / genotype_counts / properties / ref_ref / description
      Previous value: -"Samples homozygous reference for variant_ids[0] and for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / haplotype_counts / description
      Previous value: -"gnomAD's estimated haplotype counts, fractional where samples heterozygous for both variants leave the phase to its EM estimate. Each key names variant_ids[0]'s allele first and variant_ids[1]'s second."New value: +"gnomAD's estimated haplotype counts per allele pair, fractional where samples heterozygous for both variants leave the phase to its EM estimate."
    • changedOutput schema / properties / haplotype_counts / properties / alt_alt / description
      Previous value: -"Estimated haplotypes carrying the alternate allele of both variants (in cis)."New value: +"Estimated haplotypes with both alternate alleles (in cis)."
    • changedOutput schema / properties / haplotype_counts / properties / alt_ref / description
      Previous value: -"Estimated haplotypes carrying the alternate allele of variant_ids[0] and the reference allele of variant_ids[1]."New value: +"Estimated haplotype count."
    • changedOutput schema / properties / haplotype_counts / properties / ref_alt / description
      Previous value: -"Estimated haplotypes carrying the reference allele of variant_ids[0] and the alternate allele of variant_ids[1]."New value: +"Estimated haplotype count."
    • changedOutput schema / properties / haplotype_counts / properties / ref_ref / description
      Previous value: -"Estimated haplotypes carrying the reference allele of both variants."New value: +"Estimated haplotype count."
    • changedOutput schema / properties / notice / description
      Previous value: -"gnomAD's calibration caveat and its browser's reading of the probability for this pair. When no sample carries both variants, it adds that the counts come from each variant's separate data and do not account for samples not covered at both sites; that coverage sentence appears only then."New value: +"gnomAD's calibration caveat and its browser's reading of the probability for this pair; when no sample carries both variants, also that the counts come from each variant's separate data and miss samples not covered at both sites."
    • changedOutput schema / properties / populations / items / description
      Previous value: -"One genetic-ancestry group's co-occurrence counts, keyed like the overall counts."New value: +"One genetic-ancestry group's co-occurrence counts."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / description
      Previous value: -"Samples per genotype pair. Each key names variant_ids[0]'s genotype first and variant_ids[1]'s second: ref (homozygous reference), het (heterozygous), hom (homozygous alternate)."New value: +"This group's genotype counts."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / properties / het_het / description
      Previous value: -"Samples heterozygous for both variants — the carriers whose phase the probability estimates."New value: +"Samples heterozygous for both — the carriers whose phase is estimated."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / properties / het_hom / description
      Previous value: -"Samples heterozygous for variant_ids[0] and homozygous alternate for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / properties / het_ref / description
      Previous value: -"Samples heterozygous for variant_ids[0] and homozygous reference for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / properties / hom_het / description
      Previous value: -"Samples homozygous alternate for variant_ids[0] and heterozygous for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / properties / hom_hom / description
      Previous value: -"Samples homozygous alternate for variant_ids[0] and for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / properties / hom_ref / description
      Previous value: -"Samples homozygous alternate for variant_ids[0] and homozygous reference for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / properties / ref_het / description
      Previous value: -"Samples homozygous reference for variant_ids[0] and heterozygous for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / properties / ref_hom / description
      Previous value: -"Samples homozygous reference for variant_ids[0] and homozygous alternate for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / populations / items / properties / genotype_counts / properties / ref_ref / description
      Previous value: -"Samples homozygous reference for variant_ids[0] and for variant_ids[1]."New value: +"Sample count."
    • changedOutput schema / properties / populations / items / properties / haplotype_counts / description
      Previous value: -"gnomAD's estimated haplotype counts, fractional where samples heterozygous for both variants leave the phase to its EM estimate. Each key names variant_ids[0]'s allele first and variant_ids[1]'s second."New value: +"This group's haplotype counts."
    • changedOutput schema / properties / populations / items / properties / haplotype_counts / properties / alt_alt / description
      Previous value: -"Estimated haplotypes carrying the alternate allele of both variants (in cis)."New value: +"Estimated haplotypes with both alternate alleles (in cis)."
    • changedOutput schema / properties / populations / items / properties / haplotype_counts / properties / alt_ref / description
      Previous value: -"Estimated haplotypes carrying the alternate allele of variant_ids[0] and the reference allele of variant_ids[1]."New value: +"Estimated haplotype count."
    • changedOutput schema / properties / populations / items / properties / haplotype_counts / properties / ref_alt / description
      Previous value: -"Estimated haplotypes carrying the reference allele of variant_ids[0] and the alternate allele of variant_ids[1]."New value: +"Estimated haplotype count."
    • changedOutput schema / properties / populations / items / properties / haplotype_counts / properties / ref_ref / description
      Previous value: -"Estimated haplotypes carrying the reference allele of both variants."New value: +"Estimated haplotype count."
    • changedOutput schema / properties / populations / items / properties / p_compound_heterozygous / description
      Previous value: -"Estimated probability that the two variants lie on different haplotypes (in trans, compound heterozygous). Null when gnomAD computes none, as when either variant has no carrier among these samples — never read null as 0."New value: +"This group's probability, read as the overall one."
    • changedOutput schema / properties / reference_genome / description
      Previous value: -"Reference build of variant_ids — always GRCh37."New value: +"Reference build of variant_ids."
    • changedOutput schema / properties / variant_ids / description
      Previous value: -"The pair in gnomAD's order, which labels every count: variant_ids[0] is the first token of each key, variant_ids[1] the second. Can differ from the order sent."New value: +"The pair in gnomAD's order, which labels every count."
  2. Added

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnly/openWorld/idempotent, so the safety profile is covered; the description adds genuine behavior beyond that — the fixed gnomad_r2_1 dataset, the cooccurrence_unavailable failure mode with gnomAD's reason, output key ordering tied to variant_ids[0]/[1], the possibility that the returned variant_ids order differs from the sent order, and the calibration caveat in the notice. The one gap is that it does not say how heavy the call is (two variants against exome genotypes can be slow), which matters for an open-world query.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded correctly: purpose, then the clinical scenario, then dataset and constraints. But the build-conversion sentence ('...lists their GRCh37 IDs as candidates only when the ID fails there as variant_not_found_other_build; an ID gnomad_r2_1 finds returns a different variant') is a dense run-on that is hard to parse on first read, and the closing MNV remark is tangential to invoking the tool.

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 one-parameter tool with an output schema, everything an agent needs to decide and call correctly is present: eligibility rules, dataset lock, prerequisite conversion path, failure-mode semantics, and output ordering conventions. Return values are left to the output schema, as 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 the array shape and GRCh37 ID format are already documented; the description nonetheless adds real meaning — that order is arbitrary on input but that result keys follow the returned variant_ids rather than the sent order, which the schema cannot express. It also clarifies the build restriction (exactly two GRCh37 IDs, always r2_1) that the schema only implies.

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?

Names a specific analytic operation (estimate trans vs cis / probability of compound heterozygosity) on a specific resource (two variants in one gene) and states the exact dataset it reads (gnomAD v2.1 exome). An agent can distinguish it from gnomad_get_variant or gnomad_list_gene_variants 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 the triggering scenario explicitly ('a proband with two rare heterozygous variants in a recessive gene and no parental samples') and the prerequisite workflow for the common failure case: convert GRCh38 IDs first via gnomad_get_variant on gnomad_r2_1, and it explains when that lookup yields candidates versus a different variant. It also states the eligibility conditions (two different coding/UTR variants of one gene, exome AF <= 5%) that decide whether to call it at all.

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.