Skip to main content
Glama
shukwong

gnomAD MCP Server

by shukwong

get_variants_in_gene

Retrieve all genetic variants within a specific gene from the gnomAD database to analyze mutation patterns and population frequencies.

Instructions

Get all variants in a specific gene

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gene_idNoEnsembl gene ID
gene_symbolNoGene symbol
datasetNoDataset IDgnomad_r4
reference_genomeNoReference genomeGRCh38

Implementation Reference

  • Handler logic for the 'get_variants_in_gene' tool: validates input, constructs GraphQL query parameters, executes the query via makeGraphQLRequest, and extracts variants from the response.
    case "get_variants_in_gene":
      if (!args.gene_id && !args.gene_symbol) {
        throw new Error("Either gene_id or gene_symbol must be provided");
      }
      result = await makeGraphQLRequest(QUERIES.getVariantsInGene, {
        geneId: (args.gene_id as string) || null,
        geneSymbol: (args.gene_symbol as string) || null,
        datasetId: parseDatasetId((args.dataset as string) || "gnomad_r4"),
        referenceGenome: parseReferenceGenome((args.reference_genome as string) || "GRCh38"),
      });
      formattedResult = result.data?.gene?.variants || [];
      break;
  • GraphQL query schema for fetching variants in a gene, defining the input parameters and output fields.
    getVariantsInGene: `
      query GetVariantsInGene($geneId: String, $geneSymbol: String, $datasetId: DatasetId!, $referenceGenome: ReferenceGenomeId!) {
        gene(gene_id: $geneId, gene_symbol: $geneSymbol, reference_genome: $referenceGenome) {
          variants(dataset: $datasetId) {
            variant_id
            pos
            rsids
            consequence
            hgvsc
            hgvsp
            lof
            exome {
              ac
              an
              af
              filters
            }
            genome {
              ac
              an
              af
              filters
            }
          }
        }
      }
    `,
  • Input schema definition for the 'get_variants_in_gene' tool, specifying parameters and their types/descriptions.
    inputSchema: {
      type: "object",
      properties: {
        gene_id: {
          type: "string",
          description: "Ensembl gene ID",
        },
        gene_symbol: {
          type: "string",
          description: "Gene symbol",
        },
        dataset: {
          type: "string",
          description: "Dataset ID",
          default: "gnomad_r4",
        },
        reference_genome: {
          type: "string",
          description: "Reference genome",
          default: "GRCh38",
        },
      },
    },
  • src/index.ts:480-506 (registration)
    Tool registration entry in the ListTools response, including name, description, and input schema.
    {
      name: "get_variants_in_gene",
      description: "Get all variants in a specific gene",
      inputSchema: {
        type: "object",
        properties: {
          gene_id: {
            type: "string",
            description: "Ensembl gene ID",
          },
          gene_symbol: {
            type: "string",
            description: "Gene symbol",
          },
          dataset: {
            type: "string",
            description: "Dataset ID",
            default: "gnomad_r4",
          },
          reference_genome: {
            type: "string",
            description: "Reference genome",
            default: "GRCh38",
          },
        },
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't cover critical aspects like whether this is a read-only operation, potential rate limits, authentication needs, or what 'all variants' entails (e.g., pagination, format). For a tool with zero annotation coverage, this is a significant gap.

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 a single, efficient sentence with zero waste, front-loaded with the core purpose. It's appropriately sized for a simple tool, making every word count without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (4 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what 'variants' are, the return format, or how to handle the gene_id vs. gene_symbol parameters. With no output schema and minimal behavioral context, it leaves too many gaps for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter semantics beyond what the input schema provides, which has 100% coverage with clear descriptions for all 4 parameters. Since schema_description_coverage is high (>80%), the baseline is 3, as the schema does the heavy lifting without additional value from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get all variants') and target resource ('in a specific gene'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'get_region_variants' or 'get_variant', which could also retrieve variant data, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_region_variants' or 'get_variant'. It lacks explicit context, exclusions, or prerequisites, offering only a basic statement of function without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shukwong/gnomad-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server