Skip to main content
Glama

plot_tree

Plot a lineage tree with optional annotation bars alongside leaves. Add character matrices, gene expression, or metadata to explore lineage relationships.

Instructions

Plot a lineage tree, optionally with a character-matrix / annotation heatmap.

Renders with pycea and returns the figure inline plus the path it was saved to. Use keys to draw annotation bars beside the leaves -- pass the character-matrix obsm key (e.g. "characters"), obs columns, or gene names to visualize alongside the tree.

Args: dataset_id: Dataset handle. tree_key: Which tree in obst to plot. keys: Annotation(s) to draw beside the tree (obsm key, obs cols, or var_names). polar: Draw the tree radially instead of rectangularly. branch_color: Edge color, or an edge/obs attribute name to color by. node_color: Optional node color or attribute name. annotation_width: Width of each annotation column (fraction of plot). depth_key: Node attribute to use for depth/branch lengths (default: topological). width: Figure width in inches. height: Figure height in inches. dpi: Figure resolution. save_path: Where to write the PNG (default: /plots/_.png).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNo
keysNo
polarNo
widthNo
heightNo
tree_keyYes
depth_keyNo
save_pathNo
dataset_idYes
node_colorNo
branch_colorNoblack
annotation_widthNo
Behavior4/5

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

Despite no annotations, the description discloses that the tool renders with pycea, returns the figure inline, and saves to a path. However, it omits whether the save_path overwrites existing files and any potential side effects.

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?

The description is structured with a brief intro and an Args list, but the Args section is somewhat verbose with multiple lines per parameter. It could be more concise while remaining clear.

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?

Given the tool's complexity (12 parameters, no output schema), the description covers return values, rendering details, and all parameters thoroughly. No critical information is missing.

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

Parameters5/5

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

Schema description coverage is 0%, but the description fully compensates by explaining each parameter's meaning, allowed values, and defaults (e.g., keys can be obsm key, obs cols, or var_names; branch_color as color or attribute name).

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?

The description clearly states it plots a lineage tree with optional character-matrix heatmap, using a specific rendering library (pycea). It distinguishes from sibling tools like export_newick or reconstruct_tree by focusing on visualization.

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 description implicitly suggests usage for plotting trees with annotations, but does not explicitly compare to alternatives (e.g., launch_viewer) or provide conditions when not to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/colganwi/lineageverse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server