Skip to main content
Glama

collapse_group

Collapse clades by taxonomic group name with a monophyly pre-check. Skip unresolved groups or fail in strict mode; supports LUCA, LACA, LBCA, and root.

Instructions

Collapse clades by taxonomic group name with a monophyly pre-check (supports LUCA / LACA / LBCA / root).

A group whose lookup fails (unknown name / unresolvable taxonomy) is recorded as a per-group skipped entry and never aborts the whole request; strict=True converts that failure into monophyly_error.

Args: groups: [{"group": "Cyanobacteriota", "label": "...", "collapse_type": "collapse"}]. strict: Fail with monophyly_error on a non-monophyletic group. taxonomy_levels: Custom rank prefixes (prefix:rank,...). taxonomy_mapping_file: Optional taxonomy mapping table (whitelisted), for trees whose taxonomy is not embedded in tip labels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupsNo
strictNo
run_nameNo
tree_fileNo
tree_contentNo
taxonomy_levelsNo
taxonomy_mapping_fileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does add real behavioral context: failed group lookups are recorded as per-group 'skipped' entries and never abort the request, while strict=True converts that into a monophyly_error. It still omits what the collapse actually does to the output tree and whether the operation is reversible.

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?

Purpose and the monophyly caveat are front-loaded in the first sentence, followed by an efficient Args block. The Google-style docstring is reasonably tight, though a little structural overhead is spent on the Args header rather than prose.

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

Completeness3/5

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

An output schema exists, so return values needn't be described, but for a 7-parameter tree-mutation tool with no annotations the description leaves the tree input parameters and its relationship to sibling collapse tools unexplained.

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 0%, so the description must compensate, and it documents four parameters (groups with an example object shape, strict, taxonomy_levels, taxonomy_mapping_file). It leaves run_name, tree_file, and tree_content entirely unexplained, so roughly half the parameters remain undocumented in both places.

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?

States a specific verb (collapse clades) and resource (taxonomic group name) with a monophyly pre-check, and notes LUCA/LACA/LBCA/root support. It implicitly separates itself from collapse_clade and collapse_rank by operating on group names rather than clade IDs or ranks, though it never names those siblings directly.

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 implied by 'by taxonomic group name' versus the rank/clade siblings, and the strict semantics give some context for when a failure should abort. However, there is no explicit statement of when to choose this tool over collapse_clade or collapse_rank, nor any stated prerequisites for the tree input.

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