Skip to main content
Glama

draw_tree

Read-only

Draw a tree as an SVG figure — rectangular, slanted, circular or unrooted, as a phylogram or a cladogram, with tip names, branch support and a scale bar. The same layout the phylogeny panel draws with, so the figure and the panel place every node identically. Wire newick from build_tree or edit_tree.

Input Schema

NameRequiredDescriptionDefault
widthNofigure width. In px.
_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.
heightNofigure height. In px.
layoutNodrawing style; `unrooted` is the only honest one for a tree whose method inferred no root, because a rectangular drawing of it implies a root that was never inferred. Values: rectangular (Rectangular), slanted (Slanted), circular (Circular), unrooted (Unrooted).rectangular
newickYesthe tree to draw — wire `newick` from build_tree, or paste one.
supportNoprint each internal branch's support value where it carries 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.
font_sizeNotip-label size. In px. Advanced.
tip_labelsNoprint each tip's name, reserving the gutter they need.
length_unitNowhat the branch lengths MEAN, for the scale bar's caption. A tree read from a file carries no unit, so say what it is rather than letting the bar claim substitutions/site. Advanced.substitutions/site
min_supportNobelow this, a support value is not printed. Only applies when support is true. Advanced.
branch_lengthsNophylogram: horizontal distance IS evolutionary distance. Off draws a cladogram, which shows the topology alone — and then no scale bar is drawn, because the drawing is not to scale.
unrooted_methodNowhich unrooted algorithm places the nodes; equal daylight only rotates subtrees about their nodes, so it preserves every branch length. Only applies when layout is unrooted. Advanced.equal-angle

Output Schema

NameRequiredDescriptionDefault
svgYesthe figure as an SVG string
widthYesfigure width in px
heightYesfigure height in px
tipCountYestips drawn
pixelsPerUnitYespx per unit of branch length in THIS drawing, or 0 when the drawing is not to scale and no bar was drawn

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / height / x-unit
      Added value: +"px"
    • addedOutput schema / properties / width / x-unit
      Added value: +"px"
  2. 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, so safety is covered; the description adds genuinely new context — that the output is an SVG figure and that node placement matches the phylogeny panel exactly, which matters for reproducibility expectations. It does not cover size/pagination or performance on large trees, keeping it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, zero preamble: capability and options first, provenance/consistency second, input source last. Every sentence carries information an agent needs to call it correctly.

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 13 parameters, nested _subject/_files objects and an output schema, the description correctly stays high-level and lets structured fields do the detail work. The only gap is that the generic project/record wiring (_files, _subject) is never referenced, which an agent may need to supply for library documents.

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 coverage is 100% and the schema descriptions are unusually rich (unrooted honesty note, branch_lengths turning off the scale bar, equal-daylight preserving branch lengths), so the baseline is 3. The description adds only the `newick` wiring hint and no additional parameter semantics.

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?

Specific verb (draw) plus resource (tree) plus output form (SVG figure), and it enumerates the four layouts and the phylogram/cladogram distinction up front. An agent can tell this apart from build_tree (constructs) and export_tree without opening the schema.

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?

"Wire `newick` from build_tree or edit_tree" gives a concrete predecessor path and even names the two producing tools, which is exactly the routing an agent needs. It stops short of stating when NOT to use this (e.g. versus export_tree for non-figure output) or any prerequisites.

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