Skip to main content
Glama
shukwong

gnomAD MCP Server

by shukwong

get_structural_variants

Retrieve structural variant data from gnomAD for a specific genomic region to analyze chromosomal rearrangements, deletions, duplications, and inversions.

Instructions

Get structural variants in a genomic region

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chromYesChromosome
startYesStart position
stopYesStop position
datasetNoDataset ID (gnomad_sv_r4, gnomad_sv_r2_1)gnomad_sv_r4
reference_genomeNoReference genomeGRCh38

Implementation Reference

  • The main handler logic for the get_structural_variants tool within the CallToolRequestHandler switch statement. It parses arguments, calls makeGraphQLRequest with the appropriate query and variables, and extracts the structural_variants from the response data.
    case "get_structural_variants":
      result = await makeGraphQLRequest(QUERIES.getStructuralVariants, {
        chrom: String(args.chrom),
        start: parseInt(String(args.start)),
        stop: parseInt(String(args.stop)),
        datasetId: parseDatasetId((args.dataset as string) || "gnomad_sv_r4"),
        referenceGenome: parseReferenceGenome((args.reference_genome as string) || "GRCh38"),
      });
      formattedResult = result.data?.region?.structural_variants || [];
      break;
  • src/index.ts:585-616 (registration)
    Registration of the 'get_structural_variants' tool in the ListToolsRequestHandler response, defining its name, description, and input schema.
    {
      name: "get_structural_variants",
      description: "Get structural variants in a genomic region",
      inputSchema: {
        type: "object",
        properties: {
          chrom: {
            type: "string",
            description: "Chromosome",
          },
          start: {
            type: "number",
            description: "Start position",
          },
          stop: {
            type: "number",
            description: "Stop position",
          },
          dataset: {
            type: "string",
            description: "Dataset ID (gnomad_sv_r4, gnomad_sv_r2_1)",
            default: "gnomad_sv_r4",
          },
          reference_genome: {
            type: "string",
            description: "Reference genome",
            default: "GRCh38",
          },
        },
        required: ["chrom", "start", "stop"],
      },
    },
  • Input schema for the get_structural_variants tool, defining parameters like chrom, start, stop, dataset, and reference_genome with types and requirements.
    inputSchema: {
      type: "object",
      properties: {
        chrom: {
          type: "string",
          description: "Chromosome",
        },
        start: {
          type: "number",
          description: "Start position",
        },
        stop: {
          type: "number",
          description: "Stop position",
        },
        dataset: {
          type: "string",
          description: "Dataset ID (gnomad_sv_r4, gnomad_sv_r2_1)",
          default: "gnomad_sv_r4",
        },
        reference_genome: {
          type: "string",
          description: "Reference genome",
          default: "GRCh38",
        },
      },
      required: ["chrom", "start", "stop"],
    },
  • GraphQL query template (QUERIES.getStructuralVariants) used by the handler to fetch structural variants data from gnomAD API for a given genomic region.
    getStructuralVariants: `
      query GetStructuralVariants($chrom: String!, $start: Int!, $stop: Int!, $datasetId: DatasetId!, $referenceGenome: ReferenceGenomeId!) {
        region(chrom: $chrom, start: $start, stop: $stop, reference_genome: $referenceGenome) {
          structural_variants(dataset: $datasetId) {
            variant_id
            chrom
            pos
            end
            length
            type
            alts
            ac
            an
            af
            homozygote_count
            hemizygote_count
            filters
          }
        }
      }
    `,
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves data but doesn't describe key behaviors like whether it's read-only, potential rate limits, authentication needs, or what the output format looks like (e.g., list of variants, JSON structure). This leaves significant gaps for an agent to understand how to use it effectively.

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, clear sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and efficiently conveys the core function, making it easy for an agent to parse quickly.

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 of genomic data retrieval, no annotations, and no output schema, the description is incomplete. It doesn't explain what structural variants are, how results are returned, or any limitations (e.g., region size constraints). For a tool with 5 parameters and no structured output info, more context is needed to guide proper usage.

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?

Schema description coverage is 100%, so the input schema fully documents all parameters (chrom, start, stop, dataset, reference_genome). The description adds no additional meaning beyond implying a genomic region context, which is already clear from the schema. This meets the baseline for high schema coverage.

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') and resource ('structural variants in a genomic region'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_region_variants' or 'get_variants_in_gene', which might retrieve similar data, so it's not fully specific for sibling distinction.

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. It doesn't mention sibling tools or contexts where this tool is preferred, such as for structural variants versus other variant types, leaving the agent to infer usage based on the name alone.

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