Skip to main content
Glama

jean — Molecular Biology & Genomics

discover_tree_incongruence

Read-only

Ask whether some loci of a multi-locus alignment have a different history from the rest, by the incongruence length difference test (Farris et al. 1994). Each locus is one aligned FASTA file (or a set of wired alignment rows) over the same taxa, named alike in every file. D is the extra parsimony steps one shared tree costs over each locus's own tree; the null deals the same columns into parts of the same sizes at random. One global test over every locus, and one per locus against all the others combined, with the false discovery rate controlled across loci. A locus that recombined or was transferred costs steps when forced onto the others' tree, but so does a locus evolving at a different rate (Darlu & Lecointre 2002), so a call is a candidate for a tree comparison, never a recombination call. Lengths are NNI parsimony searches from each alignment's own neighbour-joining tree. Cost: a run is 1 + k + k·n + k·(1 + 2n) searches for k loci and n permutations, and a search grows fast with taxa: the default 99 permutations over seven Neisseria MLST loci took 23 s on 12 strains, 48 s on 16 and 122 s on 20, and one search of the 62-strain concatenation takes about 8 s, so 62 strains is hours. Each file is one locus; records wired with no file are grouped by the part of their name before ·.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lociYesthe loci: one aligned FASTA file per locus (its records are the taxa), or library document names. Every file must name the same taxa.
seedNoseed for the column deals. Each permutation draws from its own stream, so one can be re-run alone. Advanced.
alphaNofalse discovery rate at which a locus is called.
_filesNoThe project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name.
_subjectNoThe record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several.
correctionNoBenjamini–Hochberg (independent or positively dependent tests) or Benjamini–Yekutieli (any dependence; less power). Values: BH (Benjamini–Hochberg), BY (Benjamini–Yekutieli).BH
permutationsNorandom deals of the columns per test. The smallest p is 1 / (permutations + 1), which bounds how small a corrected q can get.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
lociYesper locus: its length, the rest's, D, the permutations' mean D, p, q and whether it is called
calledYesthe loci called at q ≤ alpha
globalYesthe test over every locus at once: D, its null, p
resultYesthe full result
nullModelYesthe null and the search, stated with every run

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare the read-only, non-destructive, closed-world profile, and the description goes well beyond them: it defines the statistic D, the permutation null, the k·(1+2n) search cost, the NNI search starting point (each alignment's neighbour-joining tree), and explicitly warns that rate heterogeneity confounds recombination signals (Darlu & Lecointre 2002). That is exactly the interpretive context an agent needs and cannot get from the 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?

A single dense paragraph, front-loaded with purpose, then data model, statistic, test design, caveat, cost, and file-grouping rule. Nearly every sentence carries distinct information, though the runtime anecdotes (23 s / 48 s / 122 s on Neisseria MLST) are somewhat verbose for the point they make.

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?

With an output schema present, return values need not be described, and the 100% schema coverage plus read-only annotations leave only interpretation and cost to cover — both are handled thoroughly, including input shape, statistical caveats, and scaling limits. Nothing an agent needs to call this correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it explains the `loci` data model (one aligned FASTA per locus, shared taxa names, wired records grouped by the part of the name before ' · ') and ties the cost to `permutations` and locus count, deepening how those parameters drive both semantics and runtime.

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?

Names a specific verb and resource — testing whether loci of a multi-locus alignment have incongruent histories — and pins the exact method (incongruence length difference / Farris et al. 1994). The clause 'a call is a candidate for a tree comparison, never a recombination call' explicitly separates its output from the recombination/mutation framing of the sibling tool `recombine`, so an agent can place it precisely.

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?

Gives clear situational context: it explains the two test scopes (one global, one per-locus against all others with FDR control) and the cost profile (default 99 permutations, search count formula, concrete runtime scaling with taxa), which tells an agent when the tool is affordable. It stops short of naming alternatives such as `compare_trees` or `discover_gene_tree_discordance`, so there is no explicit when-not-to-use routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources