Skip to main content
Glama
phylokit-mcp
by musharna

Infer a phylogenetic tree with bootstrap support

infer_tree
Read-onlyIdempotent

Build a maximum-likelihood phylogenetic tree from aligned nucleotide or protein sequences and measure clade support using bootstrap replicates (nonparametric or UFBoot2).

Instructions

Build a maximum-likelihood tree and measure how well the data support it.

Always bootstraps. There is deliberately no option to skip it: an unsupported topology is the failure mode this server exists to prevent. support_method picks which bootstrap; see its entry for the cost.

Args: fasta: Aligned sequences in FASTA, nucleotide or protein as declared by sequence_type. All sequences must be the same length — run align_sequences first if they are not. model: Substitution model, e.g. "JC", "HKY", "GTR+G" (or "LG+G" for protein). Run select_substitution_model first if you do not have a reason to prefer one. replicates: Bootstrap replicates. Nonparametric: 20-1000, default 100, and each one costs a full ML search, so the call takes about replicates x one search. UFBoot2: 1000-10000, default 1000. seed: 0 to 2**31-1. Fixes the nonparametric bootstrap's column resampling exactly; the engine's search, and with it UFBoot2's support, is seeded too but is not bit-exact (see reproducibility). sequence_type: "dna" (default) or "protein". DECLARED, never sniffed: an alignment of only A/C/G/T is a valid protein alignment too, so guessing would silently fit a nucleotide model to protein data. A protein alignment also needs a protein model — "LG+G" or "WAG", not the nucleotide default — so run select_substitution_model with the same sequence_type first. fasta_path: Path of a FASTA file to read instead of fasta. support_method: "bootstrap" (default): the nonparametric bootstrap, clades supported at 0.70, and the only method that reports well-supported clades the ML tree lacks (conflicting_support). "ufboot": IQ-TREE's ultrafast bootstrap (UFBoot2, Hoang et al. 2018), clades supported at 0.95; far faster, use it when the nonparametric cost (replicates x one ML search) is too high, e.g. more than a few dozen taxa.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "infer_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNo
fastaNo
modelNoGTR+G
fasta_pathNo
replicatesNo
sequence_typeNodna
support_methodNobootstrap

Output Schema

NameRequiredDescriptionDefault
modelYes
engineYes
newickYes
supportYes
warningsYes
alignmentYes
log_likelihoodYes
newick_topologyYes
reproducibilityYes
newick_supportedYes
branch_length_unitsYes
newick_with_supportYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.8.0
    • addedInput schema / properties / replicates / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / replicates / default
      Previous value: -100New value: +null
    • removedInput schema / properties / replicates / type
      Removed value: -"integer"
    • addedInput schema / properties / support_method
      Added value: +{
      +  "default": "bootstrap",
      +  "enum": [
      +    "bootstrap",
      +    "ufboot"
      +  ],
      +  "title": "Support Method",
      +  "type": "string"
      +}
    • addedOutput schema / properties / newick_supported
      Added value: +{
      +  "title": "Newick Supported",
      +  "type": "string"
      +}
    • addedOutput schema / properties / newick_topology
      Added value: +{
      +  "title": "Newick Topology",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "newick",
      -  "newick_with_support",
      -  "model",
      -  "log_likelihood",
      -  "alignment",
      -  "support",
      -  "reproducibility",
      -  "engine",
      -  "branch_length_units",
      -  "warnings"
      -]New value: +[
      +  "newick",
      +  "newick_with_support",
      +  "newick_supported",
      +  "newick_topology",
      +  "model",
      +  "log_likelihood",
      +  "alignment",
      +  "support",
      +  "reproducibility",
      +  "engine",
      +  "branch_length_units",
      +  "warnings"
      +]
  2. Changed5 schema fields changedv0.7.0
    • addedInput schema / properties / fasta / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / fasta / default
      Added value: +null
    • removedInput schema / properties / fasta / type
      Removed value: -"string"
    • addedInput schema / properties / fasta_path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Fasta Path"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "fasta"
      -]
  3. Changed4 schema fields changedv0.3.0
    • addedInput schema / properties / sequence_type
      Added value: +{
      +  "default": "dna",
      +  "title": "Sequence Type",
      +  "type": "string"
      +}
    • addedOutput schema / properties / branch_length_units
      Added value: +{
      +  "title": "Branch Length Units",
      +  "type": "string"
      +}
    • addedOutput schema / properties / engine
      Added value: +{
      +  "additionalProperties": true,
      +  "title": "Engine",
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "newick",
      -  "newick_with_support",
      -  "model",
      -  "log_likelihood",
      -  "alignment",
      -  "support",
      -  "reproducibility",
      -  "warnings"
      -]New value: +[
      +  "newick",
      +  "newick_with_support",
      +  "model",
      +  "log_likelihood",
      +  "alignment",
      +  "support",
      +  "reproducibility",
      +  "engine",
      +  "branch_length_units",
      +  "warnings"
      +]
  4. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint=false, but the description goes well beyond them: it discloses the cost model (each nonparametric replicate is a full ML search, so runtime scales as replicates x one search), that the seed makes resampling exact but engine search and UFBoot2 support are not bit-exact, and that sequence_type is declared rather than inferred to avoid silently fitting a nucleotide model to protein data. These are exactly the behavioral traits an agent needs and that annotations cannot carry.

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?

Front-loaded with the core behavior, then a well-organized Args block that is easy to scan. It is long, and the sequence_type entry restates the protein-model requirement twice, but nearly every sentence carries operational information rather than filler.

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?

For a seven-parameter, zero-coverage analysis tool this is thorough: prerequisites, cost, reproducibility limits, model/sequence_type coupling, and support-method tradeoffs are all covered, and an output schema exists so return values need not be re-explained. An agent can call this correctly without consulting another tool.

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 carries the full burden and does: it gives valid ranges and defaults per support method (20-1000 default 100 vs 1000-10000 default 1000), seed bounds, concrete model strings including protein examples like LG+G, mutual exclusivity of fasta vs fasta_path, and the meaning of each support_method's clade thresholds (0.70 vs 0.95). This adds substantial meaning beyond bare property names.

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?

States a specific verb and resource — build a maximum-likelihood tree — plus the defining scope: it always measures support via bootstrap. That scope cleanly separates it from siblings align_sequences, select_substitution_model and compare_trees, which are mentioned as prerequisites or alternatives rather than overlapping capabilities.

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

Usage Guidelines5/5

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

Explicit when-to-use routing: run align_sequences first if sequences are not the same length, run select_substitution_model if no model is preferred, and choose ufboot when 'replicates x one ML search' is too costly, e.g. more than a few dozen taxa. It also states a firm exclusion — there is deliberately no way to skip bootstrapping — so the agent knows the non-negotiable behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.