Skip to main content
Glama

audit_import_quality

Scan Gigwa databases for genotype-encoding artifacts. Flags runs with miscalled heterozygotes or lost hom-alt classes (BROKEN) and suspiciously complete or monomorphic data (SUSPECT).

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 the number of markers analysed (evenly-spaced subsample); 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); from list_variant_sets / list_content.
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
Behavior5/5

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

No annotations provided, so description fully carries burden. It discloses read-only nature ('never modifies Gigwa'), output file creation, bounded sampling, constant cost, and detection algorithms (HWE test, thresholds). Highly transparent.

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 fairly long but well-structured: first sentence defines purpose, then parameter details, then algorithm and output. Some redundancy (e.g., mentions 'writes CSV' twice) but front-loaded and logically organized.

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 complexity (7 parameters, no required), high schema coverage, and presence of output schema, the description is extremely complete. It covers algorithm, output format, detection criteria, and parameter effects, enabling confident agent use.

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?

Schema coverage is 100%, but description adds meaning beyond schema by explaining parameter roles (e.g., variant_set_db_id selects specific run), threshold semantics, and output file name. It enriches understanding of how each parameter affects behavior.

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 explicitly states 'Scan a Gigwa instance for databases imported with genotype-encoding artifacts' and distinguishes from sibling tools like import_vcf or diversity tools by focusing on import quality detection.

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?

It provides clear when-to-use: 'With no variant_set_db_id this audits every run; pass one to audit a single variant set.' It also explains the sampling strategy and cost, implying safe for production, but lacks explicit when-not-to-use or alternatives.

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

Install Server

Other Tools

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