Skip to main content
Glama

get_variant_consequences

Predict how genetic variants affect genes and transcripts using Ensembl genomic data. Input variant IDs or HGVS notation to analyze biological consequences.

Instructions

Predict consequences of variants on genes and transcripts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variantsYesVariant IDs or HGVS notation
speciesNoSpecies name (default: homo_sapiens)

Implementation Reference

  • The main execution logic for the 'get_variant_consequences' tool. It joins the variants array into a newline-separated string and POSTs it to the Ensembl VEP (Variant Effect Predictor) REST endpoint to retrieve consequences, then returns the JSON-formatted response.
    private async handleGetVariantConsequences(args: any) { try { const species = this.getDefaultSpecies(args.species); const variants = args.variants.join('\n'); const response = await this.apiClient.post(`/vep/species/${species}/region`, variants, { headers: { 'Content-Type': 'text/plain', }, }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleError(error, 'predicting variant consequences'); } }
  • src/index.ts:697-708 (registration)
    Tool registration in the ListToolsRequestSchema response, defining the tool name, description, and input schema.
    { name: 'get_variant_consequences', description: 'Predict consequences of variants on genes and transcripts', inputSchema: { type: 'object', properties: { variants: { type: 'array', items: { type: 'string' }, description: 'Variant IDs or HGVS notation' }, species: { type: 'string', description: 'Species name (default: homo_sapiens)' }, }, required: ['variants'], }, },
  • src/index.ts:856-857 (registration)
    Handler dispatch in the CallToolRequestSchema switch statement.
    case 'get_variant_consequences': return this.handleGetVariantConsequences(args);
  • Input validation type guard for the tool's arguments.
    const isValidVariantConsequenceArgs = ( args: any ): args is { variants: string[]; species?: string } => { return ( typeof args === 'object' && args !== null && Array.isArray(args.variants) && args.variants.length > 0 && args.variants.every((v: any) => typeof v === 'string' && v.length > 0) && (args.species === undefined || typeof args.species === 'string') ); };

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/Augmented-Nature/Ensembl-MCP-Server'

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