Skip to main content
Glama

trim_reads

Read-only

Trim sequencing adapters and low-quality ends off FASTQ reads before mapping, and report what was removed.

Input Schema

NameRequiredDescriptionDefault
readsYesthe reads to trim, as FASTQ - quality lines are required, because both halves of this need them.
_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.
adapterNothe adapter sequence to remove. Unset means quality trimming only. Illumina TruSeq is AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC and Nextera is CTGTCTCTTATACACATCT.
_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.
min_lengthNoreads shorter than this after trimming are COUNTED as too short, not removed - this tool does not filter. 0 reports none. Advanced.
min_overlapNoan adapter overlap shorter than this is ignored. Low values trim real bases by chance - at 1, a read ending in the adapter's first base is 'trimmed'. Advanced.
adapter_kindNowhich end the adapter sits at. A read running off the end of its insert hits the 3' adapter, which is why that is the default.three_prime
phred_offsetNoquality encoding: 33 for every modern FASTQ, 64 only for pre-1.8 Illumina. Advanced.
max_error_rateNoerrors allowed in the adapter match, as a fraction of the overlap. cutadapt's own default. Advanced.
quality_cutoff_backNoquality cutoff for the 3' end, where quality decays with cycle number. 0 is off; 20 is the usual choice. NOT a threshold on individual bases - see the description.
quality_cutoff_frontNoquality cutoff for the 5' end, which fails for different reasons than the 3' end and so takes its own number. 0 is off, and off is the usual answer. Advanced.

Output Schema

NameRequiredDescriptionDefault
reportYeswhat was removed and by which step: bases before and after, the two attributed counts, reads with an adapter, reads emptied and reads left too short
readsEmptiedYesreads trimmed to nothing at all - a different alarm from 'too short', because it usually means the read was all adapter
trimmedFastqYesthe trimmed reads as FASTQ, ready for `map_reads`
readsWithAdapterYeshow many reads carried the adapter - the number that says whether your insert size is shorter than your read length
basesRemovedByAdapterYesbases removed by adapter trimming alone
basesRemovedByQualityYesbases removed by quality trimming alone

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds that results are reported ('report what was removed'), which hints at returned statistics rather than only trimmed reads. It does not disclose the important default that quality trimming is disabled (cutoffs default to 0), so a reader may expect quality trimming that does not happen unless parameters are set.

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?

One sentence, front-loaded with the action and resource, with the reporting clause appended efficiently. There is no filler, though the sentence could have used its length to flag the default-off quality trimming instead.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists and the input schema is fully documented, so the description need not explain return values or parameters. Still, for an 11-parameter tool with nested record references, the description omits the default behavior (adapter-only unless quality cutoffs are set) and any pointer to alternatives like fastq_qc, leaving a meaningful gap.

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 every parameter including the advanced ones (min_overlap, max_error_rate, phred_offset, adapter_kind) is documented in the schema itself. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

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 names a specific verb and resource: trim adapters and low-quality ends off FASTQ reads, plus report what was removed. The phrase 'before mapping' positions it relative to the mapping step (map_reads/align_read siblings) without naming them explicitly. It is clearly distinct from siblings like fastq_qc or demultiplex_reads, though no sibling is called out by name.

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?

'before mapping' implies the pipeline position where this tool belongs, which is useful context. However, there is no explicit when-not guidance, no mention of fastq_qc for pre-trim assessment, and no statement that quality trimming is off by default (both quality_cutoff_* default to 0). The usage context is implied rather than stated.

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