Skip to main content
Glama

Jean — Molecular Biology & Genomics

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.

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

A3.6/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 framing about what the figure can contain (tip names, support, scale bar) but says nothing about where the SVG goes, whether it is persisted, or how it relates to notebook figures; with an output schema present, the return shape is already covered.

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?

A single front-loaded sentence with no filler; the layout list and the phylogram/cladogram contrast are the highest-value facts and arrive first.

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?

For a figure-rendering tool with a 100%-covered schema and an output schema, this is close to complete: it conveys the artefact type (SVG) and the visual modes. The only gap is workflow placement — whether to reach for it after build_tree versus export_tree — which the schema hints at but the description does not state.

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%, and the schema is unusually rich (explicit meaning for branch_lengths, layout, length_unit, unrooted_method). The description merely restates options that the schema already explains in more depth, so it adds no meaning beyond the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Draw a tree as an SVG figure') and enumerates the layouts and phylogram/cladogram modes, so an agent knows exactly what it produces. It does not differentiate from nearby siblings such as export_tree, transform_tree or add_notebook_figure, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the mention of an SVG figure suggests rendering/visualization, but there is no explicit 'use this when you want to visualize rather than export' guidance and no named alternatives. An agent must infer from sibling names whether to draw or export.

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