Skip to main content
Glama
phylokit-mcp
by musharna

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Phylogenetic inference over IQ-TREE 3, through piqtree.

The rule this server is built around: a topology without support is not a result. infer_tree always runs a bootstrap and always returns per-clade support. There is no way to ask it for a bare tree, because a bare tree from a 60-site alignment and one from a 3000-site alignment are indistinguishable to look at and one of them is wrong.

Two bootstraps. support_method="bootstrap" (the default) is the nonparametric one: each replicate is a full ML search, so its cost is replicates x one search (on 89 taxa x 435 sites, 25-93 s per replicate: 100 replicates is over an hour). support_method="ufboot" is IQ-TREE's UFBoot2: 1000 replicates in about the time of two or three searches (83 s on the same data). Their values are on different scales: nonparametric clades are supported at 0.70, UFBoot2 clades at 0.95 (Hoang et al. 2018). Each result names its method and its own thresholds in support. Only the nonparametric method can report conflicting_support.

Read the output in this order:

  1. support.fraction_resolved — the share of clades clearing the method's line. Below ~0.7 the tree is partially resolved and should be described that way.

  2. warnings with code conflicting_support — clades the DATA support that the reported tree does NOT contain. A Newick string cannot express these, so they are the finding most often missed.

  3. Individual clade support before repeating any specific grouping as a fact.

To report only the supported clades, use newick_supported: the ML tree with every clade below the method's line collapsed into a polytomy. For the full ML topology without branch lengths, use newick_topology. Copy either as is; do not rebuild a tree by hand.

select_substitution_model returns the ranking and the margin, not just a winner. Models within 2.0 of the best are conventionally indistinguishable; when the tool says so, do not report the winner as "the best-fitting model" without that caveat.

Alignment LENGTH is not evidence — n_parsimony_informative is. The tree tools refuse ragged input rather than guess. align_sequences is the step before them: it runs MAFFT on unaligned sequences and returns FASTA that infer_tree accepts as is. An alignment is an inference too — read its fraction_gaps and n_parsimony_informative before building on it.

Data in a file: pass its path (fasta_path, trees_path) instead of the text. The server reads the file itself, so there is no need to read it first or to paste it into the call. align_sequences(out_path=...) writes the alignment to a new file instead of returning it; pass that path to infer_tree or map_positions as fasta_path, rather than copying rows between calls. map_positions answers which residue of one sequence shares an alignment column with a residue of another; do not count columns by hand.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
infer_treeA

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.

select_substitution_modelA

Compare substitution models and report how much the winner won by.

A single model name reads as a finding. The ranking, the delta to the next model, and whether AIC/AICc/BIC agree are what make it one.

Args: fasta: Aligned sequences in FASTA, nucleotide or protein as declared by sequence_type. criterion: "AIC", "AICc" or "BIC". BIC penalises parameters more heavily. seed: Fixes the engine's search. top_n: How many ranked models to return. sequence_type: "dna" (default) or "protein". Ranks within that molecule type's model set — nucleotide and protein models are not comparable. fasta_path: Path of a FASTA file to read instead of fasta. models: Rank only these models (IQ-TREE names, e.g. ["JC", "K2P", "F81+F", "HKY+F"]), all returned. Bare "F81"/"HKY" have equal base frequencies in IQ-TREE; JC69, K80 and HKY85 are accepted.

compare_treesA

Robinson-Foulds distance between two trees, and which clades differ.

Compares SPLITS, not strings: the same topology has many valid Newick representations, so string equality answers a different question.

Args: newick_a: First tree in Newick format. newick_b: Second tree in Newick format. trees_path: Instead of the two strings, the path of a file holding exactly two Newick trees, A then B.

simulate_alignmentA

Generate sequences along a tree you specify, so the true answer is known.

This is the positive control for everything else here: infer a tree from the output and compare it back with compare_trees. If inference cannot recover a topology you generated from, the problem is the data or the settings, not the biology.

Args: newick: The true tree, with a branch length on every edge. model: Substitution model to simulate under. A protein model ("LG", "WAG", ...) simulates protein; pass the output to infer_tree with sequence_type="protein". alignment.moltype says which it is. length: Number of sites. seed: Fixes the simulation.

align_sequencesA

Align unaligned sequences with MAFFT, ready for infer_tree.

The returned fasta has every row the same length and can be passed to infer_tree or select_substitution_model unchanged. Each output row, with its gaps removed, is verified to equal the input sequence before it is returned.

Args: fasta: UNALIGNED sequences in FASTA, 2-200 of them. Gap characters are refused: input that is already aligned does not need this tool. sequence_type: "dna" (default) or "protein". Declared, never sniffed, and passed to MAFFT explicitly so it does not guess either. fasta_path: Path of a FASTA file to read instead of fasta. out_path: Write the aligned FASTA to this NEW file (never overwritten; its directory must exist) instead of returning it: fasta comes back None and written_to holds the absolute path, which infer_tree, select_substitution_model and map_positions take as fasta_path. Use it rather than copying rows between calls.

map_positionsA

Map a residue to its alignment column, and the column to every sequence.

Answers "which residue of B is in the same column as residue N of A" without counting by hand. Positions count residues from 1, gaps not counted; columns count from 1. At a gap, a row's position is null and between gives the residues either side.

Args: aligned: true if the input is an alignment; false if unaligned, and it is aligned with MAFFT first, as align_sequences would. sequence: The sequence whose residue position is meant. position: A residue position in sequence. Give this or column. column: An alignment column. Give this or position. fasta: The sequences in FASTA. fasta_path: Path of a FASTA file to read instead of fasta. sequence_type: "dna" (default) or "protein".

capabilitiesA

What this server can do, and the bounds it enforces.

engine_version is the installed piqtree version (e.g. "0.8.3"); iqtree_version is the IQ-TREE build inside it (e.g. "3.1.2").

Args: include_models: Include the full substitution-model list (long).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct pipeline stage: alignment, model selection, tree inference, tree comparison, position mapping, simulation, and capability introspection. The only potential overlap (map_positions aligning internally) is explicitly framed as a convenience, and infer_tree vs select_substitution_model produce clearly different outputs.

Naming Consistency4/5

Six of seven tools follow a clean verb_noun pattern (infer_tree, align_sequences, map_positions, compare_trees, select_substitution_model, simulate_alignment). The lone noun 'capabilities' deviates but is a conventional meta-tool name and remains readable.

Tool Count5/5

Seven tools is well-scoped for a phylogenetic pipeline, with no redundant or filler tools. Every tool corresponds to a necessary step in the workflow.

Completeness5/5

The surface covers the full lifecycle: align -> select model -> infer with support -> compare trees -> simulate a positive control -> map positions, plus a capabilities probe. out_path handling and internal alignment in map_positions close the usual I/O gaps.

Maintenance

ActivityActive
ResponsivenessLimited data