Skip to main content
Glama

naive_peeking_inflation

Read-onlyIdempotent

Simulate how checking a standard test after each new observation and stopping at the first significant result inflates false-positive rates, showing why always-valid sequential tests are needed.

Instructions

Demonstrates, by simulation, why sequential_two_sample_mean_test / sequential_two_proportion_test exist: the actual false-positive rate of checking an ordinary fixed-sample test (two_sample_t_test, two_proportion_z_test, ...) after every new observation and stopping the first time it clears alpha, versus the alpha actually intended. Call this to show a skeptical stakeholder concretely what "just peek at the dashboard and stop early" costs before recommending the always-valid alternative. Returns the estimated true false-positive rate, its Monte Carlo standard error, and a citation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alphaNosignificance level for the test (and any confidence interval); default 0.05
trialsNoMonte Carlo trials -- higher is more precise but slower; the result reports its own standard error
n_looksYeshow many times the result gets checked as data accumulates

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already mark it read-only, non-destructive, and idempotent, and the description adds that it is a Monte Carlo simulation producing an estimated false-positive rate with a standard error and citation. This usefully exposes the approximate/stochastic nature of the result, though it does not mention reproducibility or runtime cost.

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?

Three sentences front-load the core purpose, then give a concrete usage scenario, then list return values. The first sentence is somewhat dense but every sentence earns its place and the structure is efficient.

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

Completeness4/5

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

For a read-only simulation tool with fully documented parameters, the description covers purpose, when to call it, what it simulates, and the key return values. It lacks output formatting details that an output schema would provide, but the absence is minor given the clarity of 'returns the estimated true false-positive rate, its Monte Carlo standard error, and a citation.'

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 all three parameters are already documented. The description does not add parameter-level detail beyond the schema; it only contextualizes the simulation, so the baseline score applies.

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 names a specific verb and resource: it demonstrates, by simulation, the inflated false-positive rate of repeatedly checking an ordinary fixed-sample test and stopping at the first alpha clearance. It also explicitly ties this to the existence of sequential_two_sample_mean_test / sequential_two_proportion_test, making it distinguishable from its statistical-test siblings.

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 gives an explicit call-to-action context: use this before recommending the always-valid sequential alternative when a skeptical stakeholder needs to see the cost of early stopping. It implies the tool is a demonstration rather than an analysis tool, but it does not enumerate when not to use it or contrast it with other correction tools such as bonferroni_correction.

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