Skip to main content
Glama

score_snp

Computes the log probability change from a single nucleotide variant at the center of a DNA sequence to predict mutation effect.

Instructions

Score the effect of a SNP mutation at the center position of a DNA sequence.

Computes log probabilities for both the original sequence and the sequence with the center nucleotide replaced by the alternative allele, then returns the delta. Recommended sequence length: max_context - 1 for best performance.

This tool is useful for variant effect prediction, where the score delta indicates how much the mutation changes the model's likelihood of the sequence. Negative deltas indicate the mutation decreases likelihood; positive deltas increase it.

Args: sequence: Reference DNA sequence. Must be at least 3 nucleotides long to have a well-defined center position. Should contain standard IUPAC nucleotides (A, C, G, T, N). alternative_allele: Alternative nucleotide at the center position. Must be a single nucleotide (one of A, C, G, T, N) that differs from the reference nucleotide at the center. checkpoint: Model checkpoint identifier. If None, uses the default checkpoint. See list_available_checkpoints() for available options. reduce_method: Method for aggregating per-token scores. Must be either "mean" (average log probability across all tokens) or "sum" (sum of all log probabilities).

Returns: Dictionary containing: - checkpoint: The checkpoint identifier used - original_sequence: The input reference sequence (uppercase) - mutated_sequence: The sequence with the mutation applied at center position - center_position: Index of the mutated position (0-indexed) - reference_allele: The original nucleotide at the center position - alternative_allele: The alternative nucleotide used - reduce_method: The reduction method applied - original_score: Log probability score of the reference sequence - mutated_score: Log probability score of the mutated sequence - score_delta: Difference (mutated_score - original_score). Indicates mutation effect.

Raises: AssertionError: If sequence length < 3, alternative_allele is not a single valid nucleotide, sequence contains invalid nucleotides, or alternative_allele matches the reference nucleotide.

Example: >>> result = score_snp("ATCGATCG", "A") # Center is T, mutate to A >>> print(f"Score delta: {result['score_delta']}") >>> print(f"Original: {result['original_sequence']}") >>> print(f"Mutated: {result['mutated_sequence']}")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sequenceYes
checkpointNo
reduce_methodNomean
alternative_alleleYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description fully carries the burden of disclosure. It explains the computation (log probabilities for original and mutated sequences), the meaning of the score delta (negative/positive), the exact return structure, and error conditions (AssertionError). It even notes that a sequence must be at least 3 nucleotides long. This is comprehensive and transparent.

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 well-structured with clear sections (Args, Returns, Raises, Example). Although lengthy, every sentence adds value: parameter constraints, behavior explanation, interpretation of results, and a practical example. No redundancy or filler text is present.

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

Completeness5/5

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

Given the tool's complexity (4 parameters, 2 required) and rich output schema, the description covers all necessary aspects: purpose, parameter details, return fields, error handling, and usage guidance. It even includes a recommended sequence length and an example. There are no obvious gaps in context needed for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate entirely. The 'Args' section explains each parameter in detail: sequence (must be DNA, standard IUPAC), alternative_allele (single nucleotide differing from reference), checkpoint (optional, default), and reduce_method ('mean' or 'sum'). This goes well beyond the bare schema and fully clarifies parameter meaning and constraints.

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 function: 'Score the effect of a SNP mutation at the center position of a DNA sequence.' It uses a specific verb (score), identifies the resource (SNP mutation), and distinguishes itself from related tools like score_sequence by focusing on center-position mutation analysis.

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 the tool: 'This tool is useful for variant effect prediction.' It also offers practical guidance such as recommended sequence length and parameter constraints. However, it does not explicitly mention when not to use it or compare it to alternatives like score_sequence, so it misses the full 'when-not/alternatives' criterion.

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/not-a-feature/evo2-mcp'

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