Skip to main content
Glama
shukwong
by shukwong

get_region_variants

Retrieve genetic variants within a specified genomic region using chromosome, start, and stop positions. Access variant data from the gnomAD database with customizable dataset and reference genome options.

Instructions

Get variants in a specific genomic region

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chromYesChromosome (1-22, X, Y)
datasetNoDataset IDgnomad_r4
reference_genomeNoReference genomeGRCh38
startYesStart position
stopYesStop position

Implementation Reference

  • The main handler logic for the get_region_variants tool. It constructs variables from input arguments, invokes the GraphQL query via makeGraphQLRequest, and extracts the variants array from the response.
    case "get_region_variants": result = await makeGraphQLRequest(QUERIES.getRegionVariants, { chrom: String(args.chrom), start: parseInt(String(args.start)), stop: parseInt(String(args.stop)), datasetId: parseDatasetId((args.dataset as string) || "gnomad_r4"), referenceGenome: parseReferenceGenome((args.reference_genome as string) || "GRCh38"), }); formattedResult = result.data?.region?.variants || []; break;
  • src/index.ts:526-557 (registration)
    Tool registration in the list of available tools, defining the name, description, and input schema for get_region_variants.
    { name: "get_region_variants", description: "Get variants in a specific genomic region", inputSchema: { type: "object", properties: { chrom: { type: "string", description: "Chromosome (1-22, X, Y)", }, start: { type: "number", description: "Start position", }, stop: { type: "number", description: "Stop position", }, dataset: { type: "string", description: "Dataset ID", default: "gnomad_r4", }, reference_genome: { type: "string", description: "Reference genome", default: "GRCh38", }, }, required: ["chrom", "start", "stop"], }, },
  • Input schema defining the parameters and validation for the get_region_variants tool.
    inputSchema: { type: "object", properties: { chrom: { type: "string", description: "Chromosome (1-22, X, Y)", }, start: { type: "number", description: "Start position", }, stop: { type: "number", description: "Stop position", }, dataset: { type: "string", description: "Dataset ID", default: "gnomad_r4", }, reference_genome: { type: "string", description: "Reference genome", default: "GRCh38", }, }, required: ["chrom", "start", "stop"], },
  • GraphQL query template (QUERIES.getRegionVariants) used by the handler to fetch variants in the specified genomic region.
    getRegionVariants: ` query GetRegionVariants($chrom: String!, $start: Int!, $stop: Int!, $datasetId: DatasetId!, $referenceGenome: ReferenceGenomeId!) { region(chrom: $chrom, start: $start, stop: $stop, reference_genome: $referenceGenome) { variants(dataset: $datasetId) { variant_id pos rsids consequence hgvsc hgvsp lof exome { ac an af filters } genome { ac an af filters } } } } `,

Other Tools

Related 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