Skip to main content
Glama

jean — Molecular Biology & Genomics

transform_tree

Read-only

Edit a tree that is already built — re-root it (at its midpoint, on an outgroup, or remove the root), prune taxa away or down to a set, ladderize it, or collapse branches that are too weakly supported or too short to believe. Pruning the TREE keeps the branch lengths estimated from the full alignment, which is a different answer from rebuilding without those taxa.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taxaNotip labels — the outgroup for a re-root, or the taxa to keep/remove for a prune. Only applies when operation is reroot-outgroup or prune-keep or prune-remove.
_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.
newickYesthe tree to edit — wire `newick` from build_tree, or paste one.
_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.
positionNowhere along the outgroup edge the root lands, 0 = at the outgroup, 1 = at its sister. Only applies when operation is reroot-outgroup. Advanced.
ascendingNoladderize small clades first, rather than large. Only applies when operation is ladderize.
operationNowhat to do to the tree. Values: reroot-midpoint (Re-root at the midpoint), reroot-outgroup (Re-root on an outgroup), unroot (Remove the root (unroot)), prune-keep (Prune down to these taxa), prune-remove (Prune these taxa away), ladderize (Ladderize (presentation only)), collapse (Collapse weak or short branches).reroot-midpoint
max_lengthNocollapse any branch shorter than this (0 = do not). Only applies when operation is collapse.
min_supportNocontract any branch whose support is below this (0 = do not). Only applies when operation is collapse.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
newickYesthe edited tree
tipCountYestips remaining — the number to check after a prune
statisticsYesstatistics RE-DERIVED for the edited tree, because rerooting or pruning changes them and the previous numbers beside a changed tree would be wrong. Absent for `ladderize`, which only reorders tips and changes no statistic

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description is consistent with an in-memory transformation returning a new tree. Beyond that, it adds a genuinely useful behavioral insight — pruning preserves branch lengths estimated from the full alignment, a different answer from rebuilding — which the annotations cannot convey.

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?

Two sentences, front-loaded with the scope and operation list, and the second sentence adds the single most decision-relevant nuance. Dense but each clause maps to a real operation; the parentheticals slightly lengthen the first sentence but are warranted.

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 explained, and the input schema covers all 9 parameters at 100%. The description supplies the one piece of judgment an agent needs (prune vs. rebuild) and enumerates the operation set, so nothing essential is missing.

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 enum and per-operation parameter constraints (taxa, position, ascending, max_length, min_support) are already documented in the schema, establishing the baseline of 3. The prose enumerates the operations but largely mirrors the enum rather than adding parameter-level detail beyond the schema.

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 (Edit) on a specific resource (a tree that is already built) and enumerates the exact transformations: re-root (midpoint/outgroup/unroot), prune, ladderize, collapse. This cleanly separates it from the build_tree sibling (build vs. edit an existing tree).

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?

"A tree that is already built" clearly implies build_tree must run first, and it distinguishes pruning from rebuilding without those taxa. It does not, however, explicitly name the alternative tool or state when-not to use it, so it stops short of full when/alternatives guidance.

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