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.

Input 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

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

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuine semantics about what each mode does, but does not say that the tool returns a transformed tree rather than modifying anything in place, nor what happens on invalid input (e.g. prune-keep with no matching taxa). The verb 'Edit' is slightly at odds with an in-memory transform, though not a true contradiction.

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 front-loaded sentence that opens with the core action before enumerating modes, with no preamble or repetition. Minor loss from colloquial phrasing ('too short to believe') where a precise term would be tighter.

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

Completeness4/5

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

With 9 parameters, a nested _subject object and an output schema present, the description needs only to frame the operation set — which it does, and the schema handles everything else. The only gap is that interaction between operation and taxa (which modes consume taxa) is left entirely to the schema.

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 values, position, ascending, max_length and min_support are all documented in the schema itself. The description restates the same operation set without adding format or defaulting detail beyond what the schema provides, so the baseline 3 applies.

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 ('Edit a tree that is already built') and then enumerates the exact operation families: re-rooting, pruning, ladderizing, collapsing weak/short branches. The 'already built' clause separates it from build_tree, and the absence of comparison/reporting language separates it from compare_trees, draw_tree, and tree_statistics.

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 phrase 'a tree that is already built' plus the schema note 'wire newick from build_tree' makes the upstream precondition clear. It gives no explicit exclusions (e.g. 'use compare_trees to diff two trees'), so it lands at 4 rather than 5.

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