Skip to main content
Glama

export_genotypes

Export variant sets or filtered subsets of genotyping data from Gigwa to VCF, PLINK, or other file formats. Supports region, MAF, missing-data, individual, and metadata filters.

Instructions

Export a variant set — or a filtered/selected subset of it — to a file.

With none of the filter/selection parameters set, exports the whole set via Gigwa's plain per-format export (format one of VCF (default), PLINK or FLAPJACK; availability varies by build — check list_export_formats for what this instance actually offers, and each format's variant-type/ploidy restrictions).

Passing any of region, selected_variant_types, min_maf/max_maf, max_missing_data, individuals or metadata_fields instead drives Gigwa's selection-aware export — the same endpoint the Gigwa web UI uses for a filtered download — which additionally accepts any format the server advertises, including the bgzipped "VCF.gz". keep_on_server leaves a copy in the user's Gigwa temp-output area after this downloads it (default False).

For large sets this can take a while; raise timeout (seconds), or set wait=False to return immediately once the export is kicked off instead of blocking for the whole thing. A server that queues the work returns a download URL; check progress with get_export_progress and, once it reports complete, retrieve the file with fetch_export_file (that URL, plus output_path). wait=False always goes through the selection-aware endpoint, even with no filters set. Some Gigwa builds return the completed bytes immediately; in that case they are written to output_path and no progress/fetch step is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoBlock until the job finishes (True, default) or return immediately once it's kicked off (False) -- an import returns a progress token to poll with get_import_progress, an export returns a download URL to poll with get_export_progress and retrieve with fetch_export_file.
formatNoExport format name, e.g. VCF (default), PLINK, FLAPJACK or VCF.gz; see list_export_formats for what this instance offers (and each format's type/ploidy restrictions).VCF
regionNoRestrict analysis to a genomic window: 'chrom' or 'chrom:start-end' (1-based).
max_mafNoMaximum minor-allele frequency (0-1).
min_mafNoMinimum minor-allele frequency (0-1).
timeoutNoMaximum seconds to wait for the export to complete.
individualsNoIndividual-level identifiers to include in the export (e.g. from filter_individuals_by_metadata), not sample/callset ids; omit for all. Gigwa resolves each individual to all of its samples/callsets across runs server-side, including when an individual has more than one, so no manual sample mapping or dedup is needed.
output_pathYesDestination file path for the export.
keep_on_serverNoAlso leave a copy of the export in the user's Gigwa temp-output area after downloading it here.
metadata_fieldsNoIndividual metadata columns to embed in the export (from get_germplasm_metadata); omit for none.
max_missing_dataNoMaximum per-variant missing-data fraction (0-1).
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.
selected_variant_typesNoRestrict the export to these variant types, ';'-joined (e.g. 'SNP' or 'SNP;INDEL'); omit for all types.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

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

  1. Changed11 schema fields changedv1.9.1
    • changedInput schema / properties / format / description
      Previous value: -"Export format: VCF, PLINK or Flapjack (availability varies by Gigwa build)."New value: +"Export format name, e.g. VCF (default), PLINK, FLAPJACK or VCF.gz; see list_export_formats for what this instance offers (and each format's type/ploidy restrictions)."
    • addedInput schema / properties / individuals
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Individual-level identifiers to include in the export (e.g. from filter_individuals_by_metadata), not sample/callset ids; omit for all. Gigwa resolves each individual to all of its samples/callsets across runs server-side, including when an individual has more than one, so no manual sample mapping or dedup is needed."
      +}
    • addedInput schema / properties / keep_on_server
      Added value: +{
      +  "default": false,
      +  "description": "Also leave a copy of the export in the user's Gigwa temp-output area after downloading it here.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / max_maf
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Maximum minor-allele frequency (0-1)."
      +}
    • addedInput schema / properties / max_missing_data
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Maximum per-variant missing-data fraction (0-1)."
      +}
    • addedInput schema / properties / metadata_fields
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Individual metadata columns to embed in the export (from get_germplasm_metadata); omit for none."
      +}
    • addedInput schema / properties / min_maf
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Minimum minor-allele frequency (0-1)."
      +}
    • addedInput schema / properties / region
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Restrict analysis to a genomic window: 'chrom' or 'chrom:start-end' (1-based)."
      +}
    • addedInput schema / properties / selected_variant_types
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Restrict the export to these variant types, ';'-joined (e.g. 'SNP' or 'SNP;INDEL'); omit for all types."
      +}
    • 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."
    • addedInput schema / properties / wait
      Added value: +{
      +  "default": true,
      +  "description": "Block until the job finishes (True, default) or return immediately once it's kicked off (False) -- an import returns a progress token to poll with get_import_progress, an export returns a download URL to poll with get_export_progress and retrieve with fetch_export_file.",
      +  "type": "boolean"
      +}
  2. First observedv1.4.16

TDQS

A5/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 handles it thoroughly. It discloses blocking vs. non-blocking behavior, server-side queueing, immediate-return behavior on some builds, default keep_on_server behavior, format availability variation by build, variant-type/ploidy restrictions, and the fact that large exports can take a while.

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 long but every sentence carries operational meaning for a complex 13-parameter tool. It is front-loaded with the core purpose, then organized into modes and async behavior, avoiding filler while covering the important nuances an agent needs.

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 high-complexity tool with 13 parameters, two export modes, and an asynchronous workflow, the description is complete. It explains the full lifecycle from initiating the export to polling progress and fetching the file, covers format availability, and the output schema can handle return-value details.

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 schema coverage is 100%, the description adds significant meaning beyond the schema: which parameter combinations switch export modes, the wait=False semantics, the meaning of keep_on_server, the individuals-to-samples resolution behavior, and a caution about constructing variant_set_db_id by hand. This is far more than the schema alone provides.

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: 'Export a variant set — or a filtered/selected subset of it — to a file.' It clearly distinguishes two export modes and references sibling tools like list_export_formats, get_export_progress, and fetch_export_file, so an agent can tell this tool apart from related operations.

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 conditions: no filter/selection parameters means plain export; passing any of region, selected_variant_types, MAF bounds, max_missing_data, individuals, or metadata_fields triggers selection-aware export. It also routes the agent to list_export_formats for format availability and get_export_progress/fetch_export_file for queued jobs, making when-to-use and alternatives clear.

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