Skip to main content
Glama

audit_import_quality

Detect genotype-encoding artifacts in Gigwa imports by sampling allele matrices, flagging broken heterozygote calls, lost hom-alt genotypes, and suspicious completeness, then export a ranked CSV report.

Instructions

Scan a Gigwa instance for databases imported with genotype-encoding artifacts.

With no variant_set_db_id this audits every run on the instance; pass one to audit a single variant set. For each run it pulls a bounded genotype sample (up to max_markers markers × max_samples callsets) via paged BrAPI search/allelematrix — cheap and constant-cost regardless of how large the variant set is, so it is safe to run across a whole production instance without exporting multi-GB VCFs. The aggregate genotype-class fractions it needs are estimated tightly from the sample (a true zero hom-alt class stays zero; a rare-but-real one shows up). It flags two import failure modes plus two weaker signals:

  • BROKEN — cohort mean Ho above het_threshold (DArT 2-row mis-call), or homozygous-alt genotypes far below their HWE expectation given the alt-allele frequency (lost hom-alt class; the HWE test avoids false positives on low-MAF / mostly-monomorphic panels where near-zero hom-alt is genuine).

  • SUSPECT — call rate above complete_call_rate (no missing data, often missing forced to 0/0), monomorphic fraction above monomorphic_threshold, or AD/DP depth fields present but uniformly zero (a VCF synthesised from genotype calls with fabricated depth/likelihoods — the same converter often miscalls GT too).

Writes import_quality_scan.csv (one row per run) under output_dir (default ./gigwa_results/) and returns a summary ranked worst-first. Read-only — it never modifies Gigwa.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
max_samplesNoCap the number of samples/callsets sampled (allelematrix path).
het_thresholdNoMean observed-heterozygosity above which a run is flagged BROKEN (mis-called heterozygotes).
variant_set_db_idNoBrAPI 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.
complete_call_rateNoCall-rate above which a run is flagged as suspiciously complete (no missing data).
monomorphic_thresholdNoMonomorphic-marker fraction above which a run is flagged for low informativeness.

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.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and meets it: it explicitly states the tool is read-only and never modifies Gigwa, writes one CSV row per run under output_dir, returns a worst-first ranked summary, and explains the sampling/pagination behavior. It also discloses that thresholds reflect diagnostic logic rather than arbitrary cutoffs.

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?

The description is long but densely informative and well-structured, with a clear front-loaded purpose, bulleted flag categories, and explicit side effects. Some details are repeated in the schema, but most sentences add decision-relevant context, so the length is earned.

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 the tool's complexity, the description covers purpose, scope, cost behavior, diagnostic criteria, output location, return summary, and read-only safety. The output schema likely covers return structure, and parameter descriptions cover edge cases like the variant_set_db_id warning, so nothing essential 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 100%, so the baseline is 3, but the description adds real parameter meaning beyond the schema: it explains how variant_set_db_id scopes the audit, warns never to assemble it by hand because a wrong guess yields an opaque HTTP 500, and ties max_markers/max_samples to the bounded-cost sample. This extra context justifies a score above baseline.

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 verb and resource: 'Scan a Gigwa instance for databases imported with genotype-encoding artifacts.' It clearly distinguishes itself from sibling QC tools by focusing on import failure modes and defining two signal levels, BROKEN and SUSPECT, so an agent can tell it apart from tools like qc_call_rate or diversity_summary.

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?

The description gives explicit scoping guidance: with no variant_set_db_id it audits every run on the instance, and passing one audits a single variant set. It also explains when it is safe to use across a production instance because sampling is bounded and constant-cost, making the usage context concrete.

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