Skip to main content
Glama

plan_rnaseq_experiment

Read-only

How many biological replicates an RNA-seq experiment needs when the question is about the WHOLE experiment rather than one gene: the exact negative-binomial test with the per-gene α derived from a target false discovery rate across m genes of which m1 are expected to move (RnaSeqSampleSize 2.23.0, Zhao et al. 2018; the test is Robinson & Smyth 2008's, edgeR's exactTest), or the AVERAGE power across genes whose effects differ, with the FDR controlled (ssizeRNA 1.3.3, Bi & Liu 2016). Give solve_for n to size the experiment or power to score a design. With counts and dispersions from a pilot, the power is computed per gene over that real distribution rather than for one idealised gene. Unlike calculate_rnaseq_power this makes no normal approximation, so it is the one to use at small n or low counts.

Input Schema

NameRequiredDescriptionDefault
mNogenes tested. Only applies when method is exact.
nNobiological replicates in the control group, when solving power. Only applies when solve_for is power.
m1Nogenes expected to be differentially expressed. Only applies when method is exact.
fdrNothe false discovery rate to control across the experiment.
pi0Nothe proportion of genes with no effect. A list asks the question once per proportion, which is how the answer's sensitivity to it is read. Only applies when method is average_power.
countNoλ₀, the average read count for a prognostic gene in the control group. Only applies when method is exact.
max_nNothe largest replicate count to search. Only applies when method is average_power. Advanced.
powerNothe power to reach, when solving n.
sigmaNothe common within-gene standard deviation on that scale. Only applies when method is average_power.
_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.
countsNoa pilot's average read count per gene. With `dispersions`, the power is computed for each of these genes and averaged, instead of for one idealised gene. Only applies when method is exact.
methodNowhich question. `exact` powers one prognostic gene with the exact negative-binomial test at an α derived from the FDR; `average_power` asks what the mean power across genes is when each gene's effect is drawn from a normal. Values: exact (Exact negative-binomial test), average_power (Average power across genes).exact
_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.
effect_sdNothe spread of those true effects ACROSS genes; 0 would make every gene identical. Only applies when method is average_power.
solve_forNosize the experiment, or score a design you already have. Values: n (Replicates per group), power (Power).n
dispersionNoφ₀, the negative-binomial dispersion of a prognostic gene — the square of the biological coefficient of variation. Only applies when method is exact.
size_ratioNok, the ratio of treatment to control group size. Only applies when method is exact. Advanced.
dispersionsNothe dispersion of each gene in `counts`, in the same order. Only applies when method is exact.
effect_meanNothe mean of the normal each gene's true log-fold-change is drawn from. Only applies when method is average_power.
fold_changeNoρ, the minimum fold change to detect in a prognostic gene. Only applies when method is exact.
normalization_ratioNow, the ratio of the two groups' normalization factors. Only applies when method is exact. Advanced.

Output Schema

NameRequiredDescriptionDefault
nYesreplicates per group (the control group, when the groups differ)
rowsYeseach (n, power) the search evaluated, one row per n in n order, or every (pi0, n, power) for average power
alphaYesthe per-gene α the FDR target implies
curveYespower against replicates, which is the plot this question is read from
powerYesthe power that number of replicates gives
rCallYesthe R call that reproduces the answer
methodYeswhich of the two questions was answered
solvedYeswhich quantity was solved
perGeneYesthe power of each gene in `counts`, when a pilot distribution was given

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / normalisation_ratio
      Removed value: -{
      -  "default": 1,
      -  "description": "w, the ratio of the two groups' normalisation factors. Only applies when method is exact. Advanced.",
      -  "minimum": 0,
      -  "type": "number"
      -}
    • addedInput schema / properties / normalization_ratio
      Added value: +{
      +  "default": 1,
      +  "description": "w, the ratio of the two groups' normalization factors. Only applies when method is exact. Advanced.",
      +  "minimum": 0,
      +  "type": "number"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds meaningful method transparency: exact negative-binomial test versus average power, FDR control, and the use of pilot counts/dispersions. It omits runtime or failure-mode details, so it is not a full 5.

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?

The description is front-loaded and every sentence contributes relevant context. The first sentence is very long and carries multiple parenthetical citations, so it could be split for readability, but there is no wasted content.

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 complex 21-parameter tool with nested objects and an output schema, the description provides sufficient conceptual guidance. Remaining parameter-level details are handled by the schema, and return values are covered by the output schema.

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 description coverage is 100%, so the schema already documents parameters thoroughly. The description adds conceptual meaning for solve_for, counts/dispersions, and method selection, but does not add formatting or syntax beyond the schema.

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 gives a specific task: planning biological replicate counts or power for an RNA-seq experiment, with the key distinction between a whole-experiment question and a single-gene question. It explicitly contrasts this with the sibling tool calculate_rnaseq_power.

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?

It states exactly when to use this tool versus calculate_rnaseq_power: use this one at small n or low counts because it avoids the normal approximation. It also explains how solve_for selects sizing versus scoring a design.

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