Skip to main content
Glama

read_variant_calls

Read-only

Read a variant call set (VCF, bgzipped VCF or BCF) in this project and return the records matching a query: a locus, a variant class, a QUAL floor, PASS-only, a sample that is not hom-ref, or an INFO key.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_variant_calls"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNolast base of the region, 1-based and inclusive. Needs `contig`. Unset is the contig's last record.
fileNowhich call set in this project, by name. Unset, it is the project's only one, and it refuses rather than guessing when there is more than one.
limitNohow many matching records to return. The COUNT is always the full number of matches: this caps the rows, never the accounting.
startNofirst base of the region, 1-based and inclusive, as VCF itself counts. Needs `contig`. Unset is the contig's first record.
typesNokeep only these variant classes. The classes are htslib's own, assigned by the validated `setVariantType` and identical to the ones the panel's type filter offers. Unset keeps every class.
_filesNoThe project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name.
contigNorestrict to one contig, named as the FILE names it: `20` and `chr20` are different names and neither is normalized into the other. With `start`/`end` this is a locus read; alone it is the whole contig.
sampleNokeep only records where this sample's genotype is neither hom-ref nor missing, which is that sample's own variants out of a cohort. Named as the file's header names it.
_subjectNoThe record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several.
info_keyNokeep only records carrying this INFO key; with `info_value`, only those where it equals that value.
min_qualNokeep only records whose QUAL is at least this. A record stating no QUAL (`.`) is DROPPED unless `include_missing_qual` is on, because a missing score is not a passing one.
pass_onlyNokeep only records whose FILTER is PASS or unset (`.`): the usual first question of a call set, and the one filter that changes what most downstream steps should see.
info_valueNowith `info_key`, the value that key must equal.
include_missing_qualNokeep records that state no QUAL when `min_qual` is set. Off by default: a caller asking for a quality floor is asking about scores, and a record with none has not met it.

Output Schema

NameRequiredDescriptionDefault
readYeshow many records were read before filtering. For a locus read this is the records in that window, NOT the file (`scope` says which)
scopeYeswhether the numbers describe the whole file or one region, and (when the file was too large to read whole) that its header alone was opened. A count read from a window must never be readable as the file's
matchedYeshow many records matched: the full count, not the number of rows returned
samplesYesthe call set's sample names in header order, empty for a sites-only VCF, which is a fact about the file rather than a failure
summaryYeswhat was read and what matched, in one sentence generated from this run
variantsYesthe matching records, up to `limit`: chrom, pos (1-based), ids, ref, alts, qual, filters, end and the record's own htslib class label. Genotypes are not included: `sample` filters on them and `variant_call_summary` counts them, and a cohort record would otherwise carry thousands of columns per row
filters_appliedYesevery filter this run actually applied, with its value. A caller comparing two runs needs to know which asked the narrower question

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / types / description
      Previous value: -"keep only these variant classes. The classes are htslib's own, assigned by the ported `setVariantType` and identical to the ones the panel's type filter offers. Unset keeps every class."New value: +"keep only these variant classes. The classes are htslib's own, assigned by the validated `setVariantType` and identical to the ones the panel's type filter offers. Unset keeps every class."
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly=true, destructive=false and closed-world, so safety is covered. The description adds genuinely useful behavior beyond that: 'file' refuses rather than guessing when a project has multiple call sets, 'limit' caps rows while COUNT always reports full matches, and a missing QUAL is dropped unless include_missing_qual is on. What it omits is pagination or ordering of returned records.

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?

A single front-loaded sentence with a colon-delimited list of query modes — dense and free of filler. The list form keeps it scannable, though the one-sentence construction is long enough that a reader must parse a nested enumeration.

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?

With an output schema present, return values need not be explained, and the 14-parameter schema is fully described. The description covers every filter axis the tool exposes and clarifies the two behaviors most likely to surprise a caller (file resolution failure and QUAL-drop semantics), leaving nothing material unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already carries the per-parameter burden and the baseline of 3 applies. The description's phrase list (locus, class, QUAL floor, PASS-only, non-hom-ref sample, INFO key) mirrors those parameters without adding new syntax or edge-case meaning beyond what each schema description states.

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 states a specific verb (read) and resource (a variant call set in VCF/bgzipped VCF/BCF) and enumerates the query axes it supports: locus, variant class, QUAL floor, PASS-only, non-hom-ref sample, INFO key. That is far more than a restatement of the name. It does not explicitly contrast itself with nearby siblings such as variant_call_summary or lookup_variant, so it falls short of a 5.

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?

Usage is implied by the filter enumeration — an agent can infer this is the tool for retrieving filtered variant records — and the pass_only note ('the usual first question of a call set') hints at a recommended starting point. However, no sibling is named as an alternative and there is no explicit when-not guidance, so this remains at the minimum-viable level.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources