Skip to main content
Glama

read_species_tree

Read a species tree you already have from a Newick, species&tree block, or control file; recover migration and introgression and prepare it for BPP control-file creation.

Instructions

Read a species tree the user already has (bpp-tree --read).

Use instead of build_species_tree when the user has a tree file: a Newick (or extended Newick with introgression), a species&tree block, or an old control file containing one. Migration and introgression in the file are recovered too.

  • imap: the Imap from convert_data; fills in the individual counts. Without it the block has '?' for the counts and cannot be used yet.

  • out_prefix: also write PREFIX.stree and PREFIX.nwk, for make_control_file's stree_file. Give it together with imap.

Read in the report: status, newick, taxa, species_and_tree_block, individual_counts_filled, migration, introgression, warnings and errors. server.diagram is an ASCII drawing of the tree: ALWAYS show it to the user and ask them to confirm it is the tree they meant. server.stree_file is set when out_prefix was given.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imapNo
pathYes
out_prefixNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=false/destructiveHint=false/openWorldHint=false; the description goes well beyond them by disclosing that out_prefix writes PREFIX.stree and PREFIX.nwk, that imap is needed for counts to be filled (otherwise the block has '?' and is unusable), and that server.diagram must always be shown to the user for confirmation. The readOnlyHint=false is also resolved, since the write behavior is explained.

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?

Front-loaded with the core purpose and the sibling comparison, then organized with bullets for the two optional parameters. The enumerated list of report fields is slightly over-long, but it is functional given the absence of an output schema.

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 no output schema, the description compensates by naming the returned fields (status, newick, taxa, species_and_tree_block, individual_counts_filled, migration, introgression, warnings, errors) and the derived server.diagram / server.stree_file values. Nothing an agent needs to call this correctly or interpret the result is missing.

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

Parameters4/5

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

Schema coverage is 0%, so the description must carry the load, and it does for two of three parameters: imap's provenance from convert_data and its effect on individual counts, and out_prefix's side effects and its dependency on imap. The required `path` parameter is only implied ('a species tree the user already has') rather than defined, leaving a small gap.

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+resource ('Read a species tree') plus the underlying operation (bpp-tree --read), and explicitly distinguishes itself from build_species_tree, the closest sibling. An agent can route between the two without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use rule ('Use instead of build_species_tree when the user has a tree file') and enumerates the accepted file forms (Newick, extended Newick, species&tree block, old control file). It also states the condition coupling imap and out_prefix, which is actionable guidance rather than inference.

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