Skip to main content
Glama

jean — Molecular Biology & Genomics

propagate_uncertainty

Read-only

Uncertainty through any qPCR quantity, three independent ways at once. Give it the expression you actually report - a ratio, a normalised expression, an efficiency-corrected quantity - and a mean and standard deviation for each variable in it (or the replicate observations themselves), and it returns the analytic Taylor propagation, a Monte-Carlo simulation and a permutation resampling side by side, because they disagree in informative ways: the Taylor arm is exact only for a linear expression, and a ratio is not linear. Also reports the derivative per variable and how much of the total variance each one contributes, which is the answer to "which measurement should I make more precisely?". Reproduces qpcR 1.4.2's propagate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nsimNoMonte-Carlo draws. Only applies when do_sim is true.
seedNoR's `set.seed` value, so a simulated or permuted run is reproducible and citable. Advanced.
tiesNo`raw` only: which columns are resampled together, as one whole number per column — `1,1,2` permutes the first two as a block. Blank permutes every column on its own. Use it when two columns are readings of the same tube. Only applies when do_perm is true.
inputNowhat `variables` holds. `stat` = a summary per variable; `raw` = the replicate observations. `raw` is the stronger input: it carries the measured covariance between variables and it is the only one the permutation arm can resample, because permutation resamples observed ROWS and a mean with an SD beside it has none.stat
npermNopermutations. Only applies when do_perm is true.
_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.
do_simNorun the Monte-Carlo arm — draw from the joint normal and push every draw through the expression. Correct for any nonlinearity, at the cost of being a sample.
do_permNo`raw` only: run the permutation arm, which resamples the observed rows and so assumes no distribution at all. It also returns p-values for the three hypotheses upstream tests. Only applies when input is raw.
use_covNo`raw` only: propagate the measured covariance between the variables, not just their variances. Two Ct values read off the same plate are not independent, and treating them as independent understates the error of their ratio. Only applies when input is raw.
_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.
dist_simNothe distribution drawn from: `norm`, or `tnorm` truncated at zero — the one to use when a variable is a concentration or a fluorescence and a negative draw is not a possible measurement. Only applies when do_sim is true.norm
variablesYesthe numbers. In `stat` mode: a header row `variable, mean, sd` and one row per variable. In `raw` mode: a header row of variable names and one row per replicate, blank cells left blank (they are dropped pairwise, never read as zero). Tab- or comma-separated.
conf_levelNothe level the reported bounds are read at.
expressionYesthe quantity whose uncertainty is wanted, in R's syntax over the variable names below: `x/y`, `2^-(a - b)`, `(Etar^-Cttar)/(Eref^-Ctref)`. Every name in it must appear in `variables`.
second_orderNoinclude the second-order Taylor terms. On is upstream's default and is what makes the analytic arm usable on a ratio; off gives the classic first-order propagation of error.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
gradientYesthe printed partial derivative per variable, and its value at the means
permutedYesthe permutation arm, same fields. Null in `stat` mode, which has no rows to resample
confLowerYeslower analytic bound at `conf_level`
confUpperYesupper analytic bound
simulatedYesthe Monte-Carlo arm: mean, sd, median, mad and its own interval. Every field null when it was not run — a nonlinear expression whose two arms disagree is the finding, not a display detail
variablesYesthe variable names the run used, in expression order — every other array here is in this order
permPValuesYespermutation p-values for the three hypotheses upstream tests, in `perm > init` / `perm == init` / `perm < init` order
propagatedSdYesthe analytic (Taylor) standard error — the number to report when the expression is close to linear
contributionsYeshow much of the propagated variance each variable contributes, in %, first-order — which measurement to make more precisely
propagatedMeanYesthe expression evaluated at the input means, with the second-order correction when it is on

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only/non-destructive/closed-world safety, so the bar is lower; the description adds real behavioral context beyond that: it computes three arms concurrently, the Taylor arm is exact only for linear expressions, and it reports per-variable derivatives plus variance contributions. It does not discuss cost, runtime, or rate limits, but for a read-only computation this is rich.

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 core concept is front-loaded in the first clause and every sentence carries information. Some sentences are dense and wind (the 'they disagree in informative ways' clause is a long aside), but nothing is pure filler and the ordering is logical.

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 15-parameter tool with nested objects, a full output schema, and complete annotations, the description supplies the remaining conceptual context: what the three methods are, how to choose input mode and distribution, and what the answer means ('which measurement should I make more precisely'). An agent can act correctly from description plus 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 coverage is 100%, so the schema already documents each field; still, the description adds meaning by framing the stat-vs-raw distinction as a strength tradeoff, illustrating R expression syntax, and explaining that a ratio's nonlinearity motivates second_order. This goes beyond restating the schema, though it does not walk through every parameter.

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 opening states a specific verb and resource: propagate uncertainty for any qPCR quantity via three named methods (Taylor, Monte-Carlo, permutation). The added 'Reproduces qpcR 1.4.2's propagate' anchors it to a knowable reference, distinguishing it from siblings like relative_expression or bootstrap_cq without needing their schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly frames the input (the expression you actually report plus means/SDs or raw replicates) and explains why the three arms are surfaced together ('they disagree in informative ways'). It also motivates mode choices (raw is the stronger input; second_order is what makes a ratio usable). It stops short of naming sibling tools or explicit when-not-to-use conditions.

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