Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
-qNoOnly log ERROR messages.
-vNoEnable INFO logging.
-vvNoEnable DEBUG logging.
--jarNoPath to figtree_patched.jar. Auto-detected if omitted.
--hostNoHost to bind for SSE/HTTP transport.127.0.0.1
--portNoPort to bind for SSE/HTTP transport.8777
--log-fileNoAppend logs to the specified file.
--keep-runsNoNumber of run directories to retain.50
--transportNoTransport type: stdio (default), sse, or http.stdio
--cli-timeoutNoTimeout in seconds for passthrough CLI calls.300
--setup-timeoutNoTimeout in seconds for setup_figtree download/build.600
--file-max-bytesNoMaximum size in bytes for whitelisted files (default 200 MiB).209715200
--render-timeoutNoTimeout in seconds for JVM rendering when the call does not provide timeout.180
--workspace-rootNoWritable workspace root../figtreekit-mcp-workspace
--allow-read-rootNoRead-only allowed root. May be repeated for multiple roots.
--allow-remote-bindNoAllow binding to non-loopback addresses. The server has no built-in authentication or TLS.false
--content-max-bytesNoMaximum size in bytes for tree_content (default 10 MiB).10485760

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
analyze_taxonomyA

Analyze monophyly of all groups at a given taxonomic rank.

Equivalent to figtreekit --analyze-taxonomy RANK. Requires terminal labels carrying taxonomy info, or a whitelisted mapping file.

Args: tree_content: Newick/Nexus content. tree_file: Path to a tree file inside an allowed read root. rank: Taxonomic rank to analyze (domain..species). taxonomy_mapping_file: Optional CSV/TSV mapping (whitelisted). taxonomy_levels: prefix:rank list. group_size_min: Only report groups with at least this many taxa.

apply_configA

Apply a FigTree JSON config (figtree-block keys) plus an ordered operations list and export Nexus. Leaner than style_tree for agent-driven advanced tweaks.

All accepted parameters are validated before execution (collapse_style, multi_tree, auto_color_rank/collapse_rank and every operation field); the execution order is annotations → auto-color/collapse-rank → collapse operations, matching the CLI.

Args: config: Any figtree-block key → value mapping (dot-separated keys). operations: Ordered clade operations (same schema as style_tree). taxonomy_levels: Custom rank prefixes (prefix:rank,...); active during both loading and taxonomy analysis. seed: Reproducible tree selection for multi_tree="random".

check_figtreeB

Check Java 8+ and the figtree_patched.jar; return actionable hints.

Args: jar_path: Optional explicit JAR path to check instead of auto-detection.

check_monophylyA

Check whether one or more taxonomic groups are monophyletic.

Supports special identifiers LUCA / LACA / LBCA / root, and exact taxon lists. strict=True raises monophyly_error as soon as any group is not monophyletic.

Args: tree_content: Newick/Nexus content. tree_file: Path to a tree file inside an allowed read root. groups: List of group names (str) or exact taxon lists (list[str]). taxonomy_levels: prefix:rank list (e.g. "d:domain,p:phylum"). strict: Fail on any non-monophyletic group.

clear_annotationsA

Clear highlight and collapse annotations, including embedded ones.

Both pending annotations and [&!hilight=...] / [&!collapse=...] comments already present in the input tree text are removed before the tree is loaded/exported. Colors and fonts are intentionally NOT part of this tool (use color_clade / set_clade_font to manage them).

Args: clear_hilights: Clear background highlights (default true). clear_collapses: Clear collapses/cartoons (default true). strip_annotations: Also strip generic [&...] annotations from the text. Nexus root markers [&R] / [&U] are preserved so rooting is unchanged.

collapse_cladeC

Collapse clades by exact taxon names into collapse (triangle+label) or cartoon style.

Args: collapses: [{"taxa": ["A","B","C"], "label": "Clade1", "collapse_type": "collapse|cartoon"}].

collapse_groupA

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.

collapse_rankB

Collapse all monophyletic groups at a rank (optionally auto-coloring at a rank first) — reproduces figtreekit --collapse-rank.

Args: rank: Rank to collapse (class, phylum, ...). collapse_style: collapse | cartoon. auto_color_rank: Rank for the pre-collapse palette coloring (defaults to phylum, matching the CLI). strict: Fail when a monophyletic group cannot be collapsed. taxonomy_mapping_file: Optional taxonomy mapping table (whitelisted), for trees whose taxonomy is not embedded in tip labels.

color_cladeC

Color a clade's MRCA branch (all=false) or all descendant branches (all=true).

Args: colors: [{"taxa": ["A","B"], "color": "#2196F3", "all": false}].

cross_validateA

Cross-validate tree tip labels against sequence IDs (FASTA/FASTQ).

Args: tree_content: Newick/Nexus content. tree_file: Path to a tree file inside an allowed read root. sequences_file: Path to the sequence file (must be whitelisted). strict: Raise validation_failed on any mismatch (default true). low_memory: Accepted for figtreekit parity; IDs are always read lazily.

export_nexusB

Low-level: load tree content and export a base FigTree-compatible Nexus (structural conversion only, Newick → Nexus; no styling).

Args: include_taxa_block: Emit a TAXA block (default true). run_name: Optional artifact base name.

get_environmentA

Report the FigTreeKit-MCP runtime environment.

Returns versions of figtreekit / biopython / python / the MCP SDK, Java and figtree_patched.jar availability, the workspace root, and the allowed read-only roots.

highlight_cladeB

Add FigTree hilight annotations (background bands) to one or more clades.

Args: highlights: [{"taxa": ["A","B"], "color": "#804548", "width": 1.0, "offset": 0}] entries. offset must be an integer (the CLI parses --highlight offsets with int()). clear_existing: Clear existing highlights before applying — including [&!hilight=...] comments already embedded in the tree text (not just pending annotations).

render_treeB

Render a Nexus file (or tree content) to PNG/PDF/SVG/JPEG via the patched FigTree JAR; returns paths plus an optional base64 data URI preview. Applies background/foreground/label colour post-processing for raster formats.

Args: nexus_file: Path to a Nexus file (whitelisted; takes precedence). tree_content: Newick/Nexus content rendered through a base export. format: PNG|PDF|SVG|JPEG (default PNG). width: Image width in pixels. height: Image height in pixels. background_color: #RRGGBB background (raster post-process). foreground_color: #RRGGBB foreground (raster post-process). label_color: #RRGGBB protected label colour. jar_path: Explicit figtree_patched.jar path (default: app config / auto-detection). timeout: Max seconds for the JVM render call (default: app.render_timeout, normally 180). run_name: Optional artifact base name.

run_figtreekit_cliA

Run the figtreekit CLI with arbitrary argv (full CLI coverage; no shell). Outputs are redirected into the run directory; each rewrite is disclosed in rewrites.

Args: argv: The figtreekit arguments as an array. Use <input> as a placeholder consumed by tree_content / input_file. tree_content: If provided, written as run_dir/input.tre and replaces <input> in argv. input_file: Or a whitelisted file reference (same placeholder rule). timeout: Max execution seconds (default 300). capture_tail_bytes: Max bytes of stdout/stderr kept (default 64 KiB).

set_clade_fontC

Set font name/style/size for a clade's tip labels.

Args: fonts: [{"taxa": ["A"], "font_name": "Arial", "font_style": 1, "font_size": 14}]; font_style 0 plain / 1 bold / 2 italic / 3 bold-italic.

setup_figtreeA

Download (or use given jar) and compile the patched FigTree JAR.

Args: jar_path: Optional existing JAR to use (whitelisted; no compile). check_only: Only check dependencies (no download/compile). verbose: Print step-by-step setup progress.

style_treeB

Style a tree with the full FigTreeKit parameter surface and export a FigTree-compatible Nexus file. Returns the file, an equivalent cli_command and a config_json for byte-for-byte reproducibility, plus per-operation records.

Execution order mirrors the CLI: plain clade annotations (highlight / color / font / clear) → taxonomy auto-color / collapse-rank → collapse operations. --color-all is a global CLI switch, so mixing color and color_all operations cannot be represented exactly on the command line (the command colors every listed clade).

Multi-tree files: multi_tree="first"|"last"|"random" style one tree and export only that tree (CLI parity); pass seed to make random reproducible. split/all cannot be reproduced by a single MCP artifact (the CLI writes one file per tree), so the selected tree is styled while all trees are preserved, and an explicit warnings entry is returned.

Args: See the mapped parameter table in docs/tools_reference_EN.md; every argument is optional (unspecified = figtreekit default).

summarize_treeA

Parse and summarize a tree: format, counts, root state, branch stats.

Never fails on validation issues (use validate_tree for that); a multi-tree file without an explicit selection yields a multi_tree_hint instead of an error.

Args: tree_content: Newick/Nexus content. tree_file: Path to a tree file inside an allowed read root. include_tip_labels: Include the tip-label preview. tip_labels_limit: Max number of preview labels (1..10000). multi_tree: first|last|random|split|all selection for multi-tree Nexus. tree_index: 0-based index into a multi-tree Nexus.

taxonomy_completenessB

Report taxonomy completeness per rank; list complete/incomplete/missing tips.

Equivalent to figtreekit --check-taxonomy. Lists are truncated to the first 200 entries; totals are always returned.

Args: tree_content: Newick/Nexus content. tree_file: Path to a tree file inside an allowed read root. taxonomy_mapping_file: Optional CSV/TSV mapping (whitelisted). taxonomy_levels: prefix:rank list.

validate_treeA

Deep-validate a Newick/Nexus tree or FASTA/FASTQ sequence file.

Returns structured errors, warnings, format and counts. Semantics match figtreekit --validate but no persistent artifact is written.

Args: tree_content: Newick/Nexus/FASTA/FASTQ content (direct paste). tree_file: Path to a tree/sequence file inside an allowed read root. mol_type: Expected alphabet for sequences (DNA|RNA|protein). skip_length_check: Skip alignment-length consistency check (FASTA).

Prompts

Interactive templates invoked by user choice

NameDescription
create-publication-figure引导 AI 完成 验证→摘要→分析→样式化→渲染 的出版级出图流程。 Guide the AI through validate → summarize → analyze → style → render for a publication-grade figure.
taxonomy-audit引导 AI 输出分类学单系性审计表(批量分析 + 完整性 + 可视化)。 Guide the AI to produce a taxonomic monophyly audit table (batch analysis + completeness + optional visualisation).

Resources

Contextual data attached and managed by the client

NameDescription
_version_resource运行时版本 / JAR / Java 状态快照(JSON)。Runtime environment snapshot (JSON).
_help_resourcefigtreekit CLI 全量帮助 + MCP↔CLI 对照提示(文本)。Full CLI help (text).
_defaults_resourceFigTree 默认配置参数(figtree block 键,JSON)。FigTree defaults (JSON).

TDQS

B3.3/5.0

Scored across 21 tools

Disambiguation3/5

There is meaningful overlap between style_tree and apply_config (both apply a config plus operations and export Nexus), and the collapse_clade/collapse_group/collapse_rank trio requires careful reading to distinguish. run_figtreekit_cli also shadows nearly every other tool as an escape hatch. Descriptions do clarify intent, but an agent must parse them closely to avoid misselection.

Naming Consistency4/5

Most tools follow a clear snake_case verb_noun pattern (get_environment, highlight_clade, collapse_rank, validate_tree). Minor deviations exist: taxonomy_completeness is noun-only, cross_validate is verb_verb, and setup_ vs set_ prefixes coexist. The overall convention is still predictable and readable.

Tool Count3/5

21 tools falls in the borderline 16-25 band and feels heavy for a single MCP server, even for a broad tree-analysis domain. Several areas could be consolidated, such as the three collapse variants and style_tree/apply_config. Each tool has a plausible role, but the surface is larger than ideal.

Completeness4/5

Coverage is strong: setup/check, rendering, annotation add/clear, taxonomy analysis, monophyly checks, cross-validation, summarization, validation, export, styling and a full CLI escape hatch. Minor gaps in direct tree-shape operations (e.g., reroot, prune, rotate) can be worked around via run_figtreekit_cli. The lifecycle for core tree-styling and analysis workflows is well represented.

Maintenance

ActivityMaintained
ResponsivenessNo issues