Skip to main content
Glama

search_variants

Search variants by region, allele frequency, and missing-data criteria, then write the matching variant metadata (id, chrom, pos, ref, alt) to a CSV file.

Instructions

Search variants matching filters server-side and write the matching list to CSV.

Same filters as count_variants (region / MAF / missing-data). Returns variant metadata only (id, chrom, pos, ref, alt) — no genotypes are fetched — and writes variant_search.csv. Use count_variants first to size the result; max_variants caps how many are retrieved. For downstream genotype analysis on a filtered subset, use the region/min_maf options on the QC/diversity tools instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoRegion end position, 1-based inclusive.
startNoRegion start position, 1-based inclusive.
max_mafNoMaximum minor-allele frequency (0-1).
min_mafNoMinimum minor-allele frequency (0-1).
output_dirNoDirectory for the output CSV(s) (default ./gigwa_results/<module>/).
max_variantsNoMaximum number of matching variants to retrieve.
reference_nameNoChromosome/contig name to restrict the search to (see list_sequences).
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

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

  1. Changed1 schema field changedv1.9.1
    • 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.7/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 disclosure burden. It clearly states that the operation is server-side, writes variant_search.csv, returns only variant metadata with no genotypes fetched, and limits retrieval via max_variants. It does not mention potential file-overwrite behavior or authentication requirements, but the core behavioral traits are well covered.

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?

Four dense sentences, each earning its place: purpose, output/filter alignment, sizing/cap guidance, and alternative routing. The action is front-loaded, and no filler or restatement of schema details appears.

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 has 9 parameters, no annotations, but a full output schema, the description supplies the missing operational context: what the CSV contains, what is deliberately not fetched, how to size the query, and which sibling tools to use instead. The combination of description plus rich schema coverage makes this complete for an agent to invoke correctly.

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. The description adds meaningful grouping by stating filters are the same as count_variants (region/MAF/missing-data), which links start/end/reference_name, min/max_maf, and max_missing_data into a cohesive filter set. It also clarifies max_variants as a retrieval cap, adding semantic context beyond the schema's per-field 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 action—'Search variants matching filters server-side and write the matching list to CSV'—and clearly distinguishes the tool from siblings like count_variants and the QC/diversity tools by stating it returns metadata only and writes a CSV. It also scopes the output precisely ('id, chrom, pos, ref, alt'), making the tool's niche unambiguous.

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 usage direction: use count_variants first to size results, rely on max_variants to cap retrieval, and avoid this tool for downstream genotype analysis in favor of QC/diversity tools with region/min_maf options. This is direct when-to-use and when-not-to-use guidance tied to named 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