Skip to main content
Glama
taehojo
by taehojo

batch_score_variants

Score and prioritize up to 100 genetic variants simultaneously using AlphaGenome AI to rank them by regulatory impact for GWAS post-analysis and VCF filtering.

Instructions

Score and prioritize multiple genetic variants using AlphaGenome AI.

Powered by Google DeepMind's AlphaGenome model for high-throughput variant scoring.

Analyzes up to 100 variants simultaneously and ranks them by regulatory impact.

Scoring metrics:

  • rna_seq: Gene expression changes

  • splice: Splicing alterations

  • regulatory_impact: Combined regulatory score

  • combined: All metrics weighted

Perfect for: GWAS post-analysis, VCF filtering, variant prioritization.

Example: "Score these 50 variants and show me the top 10 by regulatory impact"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variantsYesList of variants to analyze (1-100)
scoring_metricYesMetric to use for scoring and ranking
top_nNoNumber of top variants to return (default: 10, max: 100)
include_interpretationNoInclude detailed clinical interpretation (default: false)

Implementation Reference

  • MCP CallTool request handler case for 'batch_score_variants': validates input using batchScoreSchema, calls AlphaGenomeClient.batchScore(), formats result with formatBatchResult() and returns as text content.
    case 'batch_score_variants': {
      const params = validateInput(batchScoreSchema, args) as BatchScoreParams;
      const result = await getClient().batchScore(params);
      const formatted = formatBatchResult(result);
    
      return {
        content: [
          {
            type: 'text',
            text: formatted,
          },
        ],
      };
  • AlphaGenomeClient.batchScore method: core execution logic that invokes Python bridge with action 'batch_score', passing variants and scoring parameters, handles errors.
    async batchScore(params: BatchScoreParams): Promise<BatchResult> {
      try {
        const result = await this.callPythonBridge<BatchResult>('batch_score', {
          variants: params.variants,
          scoring_metric: params.scoring_metric,
          top_n: params.top_n,
        });
    
        return result;
      } catch (error) {
        if (error instanceof ApiError) {
          throw error;
        }
        throw new ApiError(`Batch scoring failed: ${error}`, 500);
      }
    }
  • Tool object definition for 'batch_score_variants' including name, description, and detailed inputSchema for MCP tool listing and validation.
    export const BATCH_SCORE_TOOL: Tool = {
      name: 'batch_score_variants',
      description: `Score and prioritize multiple genetic variants using AlphaGenome AI.
    
    Powered by Google DeepMind's AlphaGenome model for high-throughput variant scoring.
    
    Analyzes up to 100 variants simultaneously and ranks them by regulatory impact.
    
    Scoring metrics:
    - rna_seq: Gene expression changes
    - splice: Splicing alterations
    - regulatory_impact: Combined regulatory score
    - combined: All metrics weighted
    
    Perfect for: GWAS post-analysis, VCF filtering, variant prioritization.
    
    Example: "Score these 50 variants and show me the top 10 by regulatory impact"`,
      inputSchema: {
        type: 'object',
        properties: {
          variants: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                chromosome: {
                  type: 'string',
                  description: 'Chromosome',
                  pattern: '^chr([1-9]|1[0-9]|2[0-2]|X|Y)$',
                },
                position: {
                  type: 'number',
                  description: 'Position',
                  minimum: 1,
                },
                ref: {
                  type: 'string',
                  description: 'Reference allele',
                  pattern: '^[ATGCatgc]+$',
                },
                alt: {
                  type: 'string',
                  description: 'Alternate allele',
                  pattern: '^[ATGCatgc]+$',
                },
                variant_id: {
                  type: 'string',
                  description: 'Optional: variant identifier (e.g., rs number)',
                },
              },
              required: ['chromosome', 'position', 'ref', 'alt'],
            },
            description: 'List of variants to analyze (1-100)',
            minItems: 1,
            maxItems: 100,
          },
          scoring_metric: {
            type: 'string',
            enum: ['rna_seq', 'splice', 'regulatory_impact', 'combined'],
            description: 'Metric to use for scoring and ranking',
          },
          top_n: {
            type: 'number',
            description: 'Number of top variants to return (default: 10, max: 100)',
            minimum: 1,
            maximum: 100,
          },
          include_interpretation: {
            type: 'boolean',
            description: 'Include detailed clinical interpretation (default: false)',
          },
        },
        required: ['variants', 'scoring_metric'],
      },
    };
  • Zod schema 'batchScoreSchema' for runtime input validation of batch_score_variants parameters, used in the handler.
    export const batchScoreSchema = z.object({
      variants: z
        .array(
          z.object({
            chromosome: chromosomeSchema,
            position: positiveIntSchema,
            ref: nucleotideSchema,
            alt: nucleotideSchema,
            variant_id: z.string().optional(),
          })
        )
        .min(1, 'At least one variant is required')
        .max(100, 'Maximum 100 variants allowed'),
      scoring_metric: z.enum(['rna_seq', 'splice', 'regulatory_impact', 'combined']),
      top_n: z.number().int().min(1).max(100).optional().default(10),
      include_interpretation: z.boolean().optional().default(false),
    });
  • formatBatchResult helper: formats the BatchResult from client into human-readable Markdown output with top variants table, impact distribution, and disclaimers.
    export function formatBatchResult(result: BatchResult): string {
      const date = new Date().toISOString().split('T')[0];
      const time = new Date().toISOString().split('T')[1].split('.')[0];
    
      let output = `# 📊 AlphaGenome Batch Variant Analysis\n\n`;
      output += `**Total Variants Analyzed**: ${result.total_analyzed}\n`;
      output += `**Analysis Date**: ${date} ${time} UTC\n\n`;
      output += `---\n\n`;
    
      output += `## 🏆 Top Variants by Impact\n\n`;
      output += `| Rank | Variant ID | Location | Impact Score | Impact Level | Key Effect |\n`;
      output += `|------|------------|----------|--------------|--------------|------------|\n`;
    
      result.variants.forEach((v) => {
        const badge =
          v.impact_level === 'high'
            ? '🔴 High'
            : v.impact_level === 'moderate'
              ? '🟡 Moderate'
              : '🟢 Low';
        const varId = v.variant_id || '-';
        const keyEffect = v.key_effect || 'Regulatory element';
        output += `| ${v.rank} | ${varId} | ${v.variant} | ${v.score.toFixed(
          2
        )} | ${badge} | ${keyEffect} |\n`;
      });
    
      output += `\n---\n\n`;
    
      output += `## 📈 Impact Distribution\n\n`;
      output += `\`\`\`\n`;
      output += `Impact Level    | Count | Percentage\n`;
      output += `----------------|-------|------------\n`;
      for (const [level, count] of Object.entries(result.distribution)) {
        const pct = ((count / result.total_analyzed) * 100).toFixed(1);
        const emoji = level === 'high' ? '🔴' : level === 'moderate' ? '🟡' : '🟢';
        output += `${emoji} ${level.padEnd(13)} | ${String(count).padStart(5)} | ${pct.padStart(5)}%\n`;
      }
      output += `----------------|-------|------------\n`;
      output += `Total           | ${String(result.total_analyzed).padStart(5)} | 100.0%\n`;
      output += `\`\`\`\n\n`;
    
      output += `---\n\n`;
      output += `## ⚠️ Important Disclaimer\n\n`;
      output += `**For Research Use Only**\n\n`;
      output += `- ⚠️ NOT for clinical use or diagnosis\n`;
      output += `- ✅ Powered by AlphaGenome AI predictions\n`;
      output += `- 📋 Validate with experimental data\n\n`;
      output += `---\n\n`;
      output += `*AlphaGenome MCP Server v0.1.0*\n`;
      output += `*GitHub: https://github.com/taehojo/alphagenome-mcp*\n`;
    
      return output;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by specifying the batch capacity ('up to 100 variants simultaneously'), ranking behavior ('ranks them by regulatory impact'), and listing the four scoring metrics. However, it doesn't mention important behavioral aspects like execution time, rate limits, authentication requirements, or what happens when variants exceed the limit. The description adds useful context but doesn't fully compensate for the lack of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized. It starts with the core purpose, adds supporting details about technology and metrics, provides usage context, and ends with an example. Most sentences earn their place, though the 'Powered by Google DeepMind's AlphaGenome model' line feels slightly promotional rather than strictly necessary for tool selection.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (batch processing of genetic variants with multiple scoring metrics) and the absence of both annotations and output schema, the description does a decent job but has gaps. It explains what the tool does and when to use it, but doesn't describe the output format, error conditions, or important behavioral constraints. For a tool with no output schema, more information about return values would be helpful.

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?

Schema description coverage is 100%, so the schema already documents all four parameters thoroughly. The description adds some value by explaining the scoring metrics ('rna_seq: Gene expression changes', etc.) and mentioning the 100-variant limit, but doesn't provide additional parameter semantics beyond what's in the schema. This meets the baseline expectation when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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: 'Score and prioritize multiple genetic variants using AlphaGenome AI.' It specifies the verb ('score and prioritize'), resource ('genetic variants'), and technology ('AlphaGenome AI'). The description distinguishes this batch processing tool from sibling tools that appear to focus on individual variants or different analyses (e.g., 'predict_splice_impact', 'explain_variant_impact').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: 'Perfect for: GWAS post-analysis, VCF filtering, variant prioritization.' It gives an example use case: 'Score these 50 variants and show me the top 10 by regulatory impact.' However, it doesn't explicitly state when NOT to use this tool or mention specific alternatives among the sibling tools, which prevents a perfect score.

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/taehojo/alphagenome-mcp'

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