Skip to main content
Glama

diversity_fst

Compute pairwise Weir & Cockerham Fst between defined sample groups to assess genetic differentiation, outputting a CSV of Fst values for every group pair.

Instructions

Pairwise Weir & Cockerham Fst between groups of samples.

Define the groups one of two ways:

  • groups_json — a JSON object mapping each group name to a list of accession names (or callset ids), e.g. {"north": ["112","156"], "south": ["11","42"]}.

  • metadata_tsv + group_column — read groups from a metadata TSV (the same file format used by import_metadata), keyed on id_column (default individual) and grouped by group_column.

Writes fst_pairwise.csv with the Fst for every group pair. (Server-side BrAPI attributes are not used for grouping — that endpoint is unavailable on the target Gigwa 2.12 build.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoGenotype source: 'vcf' (full export, cached) or 'allelematrix' (paged, server-side subset).vcf
regionNoRestrict analysis to a genomic window: 'chrom' or 'chrom:start-end' (1-based).
id_columnNoColumn in the metadata TSV holding the individual/accession id (default 'individual').individual
output_dirNoDirectory for the output CSV(s) (default ./gigwa_results/<module>/).
groups_jsonNoJSON object mapping each group name to a list of accession names/ids.
max_markersNoCap analysis to the first N markers in canonical Gigwa search order; omit to use all.
group_columnNoColumn in the metadata TSV holding the group/population label.
metadata_tsvNoPath to a metadata TSV (import_metadata format) used to define groups.
variant_set_db_idYesBrAPI variantSetDbId identifying the run (MODULE§project§run) -- copy the exact string from list_variant_sets / list_content, never assemble one by hand: the middle segment is a numeric project index, not the project's name, and a wrong guess fails with an opaque HTTP 500 rather than a clear error.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv1.9.1
    • changedInput schema / properties / max_markers / description
      Previous value: -"Cap the number of markers analysed (evenly-spaced subsample); omit to use all."New value: +"Cap analysis to the first N markers in canonical Gigwa search order; omit to use all."
    • changedInput schema / properties / variant_set_db_id / description
      Previous value: -"BrAPI variantSetDbId identifying the run (MODULE§project§run); from list_variant_sets / list_content."New value: +"BrAPI variantSetDbId identifying the run (MODULE§project§run) -- copy the exact string from list_variant_sets / list_content, never assemble one by hand: the middle segment is a numeric project index, not the project's name, and a wrong guess fails with an opaque HTTP 500 rather than a clear error."
  2. First observedv1.4.16

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states that the tool writes fst_pairwise.csv, explains that server-side BrAPI attributes are intentionally not used because the endpoint is unavailable on the target Gigwa build, and mentions caching behavior in the method parameter. These are meaningful behavioral details beyond the tool name, though it could also explicitly state whether any persistent state is modified.

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?

The description is well organized, front-loaded with the core purpose, and uses a compact bullet-like structure for the two group-definition paths. Every sentence contributes either to usage guidance, an example, or a behavioral caveat; there is no filler.

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?

For a tool with 9 parameters and no annotations, the description covers the essential setup, outputs, grouping options, and a known server limitation. It also warns about the most likely mistake, misassembling variant_set_db_id, and points to sibling tools for metadata format. The presence of an output schema means the description need not enumerate return fields.

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?

Although the schema already covers 100% of parameters, the description adds substantial semantic value: it explains how groups_json and metadata_tsv interact, gives a working JSON example, clarifies the relationship between id_column and group_column, and provides a vivid warning about the variant_set_db_id format. This goes well beyond the raw schema descriptions.

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 opens with a specific, informative phrase — 'Pairwise Weir & Cockerham Fst between groups of samples' — naming both the statistical method and the resource it operates on. It clarifies the grouping input formats, which distinguishes this from other diversity_* siblings by defining its exact analytical scope.

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 gives concrete guidance on the two acceptable ways to define groups, includes a JSON example, and references the metadata format used by import_metadata as a sibling touchpoint. It does not explicitly list when to choose this tool over diversity_by_group or diversity_summary, but it provides clear context for invoking it correctly.

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

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/gkanogiannis/Gigwa-MCP'

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