get_mitochondrial_variants
Retrieve mitochondrial DNA variants from gnomAD to analyze genetic variations in mitochondrial genomes for research and clinical applications.
Instructions
Get mitochondrial variants
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_mitochondrial_variants"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | No | Dataset ID | gnomad_r3 |
Implementation Reference
- src/index.ts:732-737 (handler)Handler logic for the get_mitochondrial_variants tool. It parses the dataset ID, makes a GraphQL request using the predefined mitochondrial variants query, and formats the result.
case "get_mitochondrial_variants": result = await makeGraphQLRequest(QUERIES.getMitochondrialVariants, { datasetId: parseDatasetId((args.dataset as string) || "gnomad_r3"), }); formattedResult = result.data?.mitochondrial_variants || []; break; - src/index.ts:617-630 (registration)Tool registration in the ListTools response, defining the name, description, and input schema for get_mitochondrial_variants.
{ name: "get_mitochondrial_variants", description: "Get mitochondrial variants", inputSchema: { type: "object", properties: { dataset: { type: "string", description: "Dataset ID", default: "gnomad_r3", }, }, }, }, - src/index.ts:341-358 (schema)GraphQL query schema definition for retrieving mitochondrial variants, referenced as QUERIES.getMitochondrialVariants in the handler.
getMitochondrialVariants: ` query GetMitochondrialVariants($datasetId: DatasetId!) { mitochondrial_variants(dataset: $datasetId) { variant_id pos ref alt rsids ac_het ac_hom an af_het af_hom max_heteroplasmy filters } } `, - src/index.ts:384-400 (helper)Helper function to parse and validate the dataset ID, used in the handler for get_mitochondrial_variants.
function parseDatasetId(dataset: string): string { const validDatasets = [ "gnomad_r2_1", "gnomad_r3", "gnomad_r4", "gnomad_sv_r2_1", "gnomad_sv_r4", "gnomad_cnv_r4", "exac", ]; const datasetLower = dataset.toLowerCase(); if (!validDatasets.includes(datasetLower)) { return "gnomad_r4"; // Default to latest version } return datasetLower; }