Skip to main content
Glama
Augmented-Nature

Ensembl MCP Server

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')
      );
    };
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 mentions 'predict,' implying a computational or analytical operation, but doesn't detail aspects like whether this is a read-only query, potential rate limits, accuracy considerations, or output format. This leaves significant gaps in understanding the tool's behavior.

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, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and appropriately sized, making it easy to grasp 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 predicting variant consequences and the lack of annotations and output schema, the description is insufficient. It doesn't explain what the predictions entail, how results are returned, or any limitations, making it incomplete for effective use by an AI agent.

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?

The input schema has 100% description coverage, clearly documenting both parameters ('variants' and 'species'). The description adds no additional meaning beyond the schema, such as examples of variant IDs or species names, but since the schema is comprehensive, the baseline score of 3 is appropriate.

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 tool's purpose with a specific verb ('predict') and resource ('consequences of variants on genes and transcripts'), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_variants' or 'get_transcripts', which might handle related but different aspects of variant or transcript data, so it doesn't reach the highest score.

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. With sibling tools such as 'get_variants' and 'get_transcripts' available, there's no indication of scenarios where this tool is preferred, prerequisites, or exclusions, leaving usage unclear.

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

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