Skip to main content
Glama

make_loci_bed

Create a BED file of candidate loci by tiling a genome into windows, needed when BAM/CRAM or gVCF data lacks a BED file for inspect_data and convert_data.

Instructions

Make a BED file of candidate loci by tiling a genome into windows (bpp-seqs windows).

Use when the user has BAM/CRAM or gVCF data but no BED file saying which regions are the loci (inspect_data then lists a BED under missing). input is anything holding chromosome names and lengths: the reference FASTA, a BAM/CRAM or a VCF/gVCF. out is the BED file to write; pass it to inspect_data and convert_data with the other files.

Ask the user for the locus size and spacing; do not choose them yourself. All options are passed to bpp-seqs unchanged:

  • window_size: locus length in bp. step: distance between window starts (default: window_size, so windows do not overlap).

  • min_spacing: least distance in bp between kept loci on a chromosome.

  • n_loci: sample this many windows at random (seed fixes the sample); omit to keep them all.

  • include_chrom / exclude_chrom: chromosome names. autosomes_only: skip sex chromosomes, mitochondria and unplaced contigs (by name).

  • skip_edges: drop this many bp at both ends of each chromosome.

  • exclude_regions: a BED file of intervals to avoid.

  • overwrite: an existing file is refused unless true. Ask the user.

Read in the report: n_windows_emitted (loci written) and the counts before it, which show what each filter removed. Next: inspect_data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outYes
seedNo
stepNo
inputYes
n_lociNo
overwriteNo
skip_edgesNo
min_spacingNo
window_sizeYes
exclude_chromNo
include_chromNo
autosomes_onlyNo
exclude_regionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, openWorldHint=false, destructiveHint=false. The description adds substantial context beyond them: overwrite refusal of existing files, the meaning of the report counts ('which show what each filter removed'), and the n_windows_emitted output field. Good added value, though it doesn't cover rate limits or failure modes.

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?

Front-loaded purpose sentence, then usage condition, then a dense but necessary bulleted parameter list. It is long, but with 13 parameters every bullet earns its place. Minor redundancy in the repeated 'ask the user' instruction for size/spacing and overwrite.

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 13 parameters, no output schema and only hint-level annotations, the description covers what the tool does, when to use it, what each argument means, what the report returns, and the next step. Nothing an agent needs to call it correctly is missing.

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 description coverage is 0%, so the description carries the full burden for all 13 parameters — and it does: it documents window_size, step (with default semantics), min_spacing, n_loci/seed sampling, include/exclude_chrom, autosomes_only, skip_edges, exclude_regions, overwrite, and both input and out. This is a strong example of compensating for empty schema 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?

States a specific verb and resource ('Make a BED file of candidate loci by tiling a genome into windows'), names the bpp-seqs concept, and identifies the inputs. An agent can distinguish this from sibling tools like subset_loci or convert_data without opening the schema.

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?

Gives an explicit triggering condition ('when the user has BAM/CRAM or gVCF data but no BED file ... inspect_data then lists a BED under missing') and names the follow-on tool (inspect_data, convert_data). The 'ask the user for locus size and spacing; do not choose them yourself' instruction is an unusually clear behavioral directive.

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