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.

Input 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

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
firstOrderMeanYesthe expression evaluated at the input means, before the second-order correction
propagatedMeanYesthe expression evaluated at the input means, with the second-order correction when it is on
secondOrderMeanYesthe mean with the second-order Taylor correction applied, whether or not the reported mean uses it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / firstOrderMean
      Added value: +{
      +  "description": "the expression evaluated at the input means, before the second-order correction",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / secondOrderMean
      Added value: +{
      +  "description": "the mean with the second-order Taylor correction applied, whether or not the reported mean uses it",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "propagatedMean",
      -  "propagatedSd",
      -  "confLower",
      -  "confUpper",
      -  "simulated",
      -  "permuted",
      -  "permPValues",
      -  "contributions",
      -  "gradient",
      -  "variables"
      -]New value: +[
      +  "propagatedMean",
      +  "firstOrderMean",
      +  "secondOrderMean",
      +  "propagatedSd",
      +  "confLower",
      +  "confUpper",
      +  "simulated",
      +  "permuted",
      +  "permPValues",
      +  "contributions",
      +  "gradient",
      +  "variables"
      +]
  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 cover the safety profile (readOnly, non-destructive, closed-world), so the description is free to add behavioral context, which it does: it explains that results are returned side by side, that the Taylor arm is exact only for linear expressions, and that a ratio is nonlinear. This is genuine added value beyond annotations. It does not touch on cost or rate limits, but for a read-only computation that is minor.

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 three sentences, front-loads the core purpose and the three-arm output, and moves to input expectations without wasted preamble. It is dense but readable; minor tightening of the long second sentence would help but it is not padded.

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 15 parameters, an output schema, and full annotation coverage, the description supplies exactly what is missing: the conceptual model of three disagreeing arms, the reason for their disagreement, and the shape of expected input. The generic _files/_subject plumbing is not its burden to explain.

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 coverage is 100%, so the schema itself fully documents all 15 parameters, establishing a baseline of 3. The description reinforces the expression/variables relationship ('a mean and standard deviation for each variable in it'), but adds little syntax or format detail beyond what the schema already provides, including the stat-versus-raw mode distinction which is already explained in the schema.

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 and resource ('Uncertainty through any qPCR quantity') and enumerates the three computations (analytic Taylor, Monte-Carlo, permutation resampling) it returns. It is clearly distinguishable from the many qPCR siblings, though it does not explicitly name the closest alternative by name, so it stops 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?

It describes the inputs to supply ('the expression you actually report... a mean and standard deviation for each variable... or the replicate observations') and the rationale for running all three arms, which implies when this tool is appropriate. However, it never explicitly states when NOT to use it or points to sibling tools like bootstrap_cq or relative_expression, so guidance is implied rather than explicit.

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