Skip to main content
Glama

diversity_summary

Calculate per-marker diversity statistics (MAF, He, Ho, PIC) and dataset means, exporting results to CSV for downstream analysis.

Instructions

Per-marker diversity statistics (MAF, He, Ho, PIC) and dataset means.

He is Nei's gene diversity (1 - Σpᵢ²), Ho is observed heterozygosity, PIC is polymorphism information content. Writes diversity_markers.csv. For large sets pass method="allelematrix" + max_markers to sample server-side.

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).
output_dirNoDirectory for the output CSV(s) (default ./gigwa_results/<module>/).
max_markersNoCap analysis to the first N markers in canonical Gigwa search order; omit to use all.
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/5.0
Behavior4/5

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

No annotations are provided, so the description carries the transparency burden. It discloses the file side effect (diversity_markers.csv), defines the statistics being computed including He's formula, and explains server-side sampling for large sets. It does not discuss overwrite behavior or permissions, but for an analysis/write-CSV tool this is strong coverage.

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 compact and well front-loaded: purpose, metric definitions, output filename, and a performance tip. Every sentence earns its place and 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?

Given 100% schema parameter coverage and the presence of an output schema, the description closes the remaining gaps: what the metrics mean, what file is produced, and how to handle large datasets. Nothing needed to call the tool correctly 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?

With 100% schema description coverage the baseline is 3, but the description adds meaningful cross-parameter guidance: pairing method='allelematrix' with max_markers for large sets and linking output_dir to the named CSV output. It does not augment region, but the schema already documents that sufficiently.

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?

The description clearly identifies the deliverable — per-marker MAF, He, Ho, and PIC statistics plus dataset means — and names the output file diversity_markers.csv. This is enough to distinguish it from siblings like diversity_pca or diversity_fst by output nature, though the core purpose is phrased as a noun phrase rather than an explicit verb such as 'computes'.

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?

It provides a concrete usage tip: for large sets, use method='allelematrix' with max_markers to sample server-side. However, it never states when to prefer this tool over the many related diversity_* and qc_* siblings, and it gives no exclusions or explicit alternatives.

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