Skip to main content
Glama
shukwong
by shukwong

get_mitochondrial_variants

Extract mitochondrial variants from gnomAD datasets to analyze genetic variations in mitochondrial DNA. Supports dataset selection for precise querying and research applications.

Instructions

Get mitochondrial variants

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetNoDataset IDgnomad_r3

Implementation Reference

  • Handler for the 'get_mitochondrial_variants' tool. Executes a GraphQL query using makeGraphQLRequest with the specified dataset to retrieve mitochondrial variants.
    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)
    Registration of the tool in the ListTools response, including name, description, and input schema.
    { name: "get_mitochondrial_variants", description: "Get mitochondrial variants", inputSchema: { type: "object", properties: { dataset: { type: "string", description: "Dataset ID", default: "gnomad_r3", }, }, }, },
  • GraphQL query schema definition for fetching mitochondrial variants, referenced as QUERIES.getMitochondrialVariants.
    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 } } `,
  • Helper function used by the handler to perform GraphQL requests to the gnomAD API.
    async function makeGraphQLRequest(query: string, variables: Record<string, any> = {}): Promise<GnomadResponse> { const response: Response = await fetch(GNOMAD_API_URL, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ query, variables, }), }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return await response.json() as GnomadResponse; }

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