Skip to main content
Glama

Sample size & power / 样本量计算(设计口径)

sample_size_calculator
Read-only

Sample size & power / 样本量计算(设计口径) | USE WHEN: calculate how many subjects are needed (two means / two proportions / correlation / survival), or solve for power | ALIASES: 样本量, 要做多少例, 需要多少病人, sample size, power calculation, 把握度, 最少例数, n per group | RETURNS: 每组例数与合计

Input Schema

NameRequiredDescriptionDefault
sdNo标准差
alphaNo显著性水平,默认 0.05
powerNo把握度,默认 0.8
effectNo预期效应量/差值
dropoutNo脱落率
sample_typeNo计算类型:两组均数/两组率/相关/生存

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnly/openWorld=false/non-destructive, so the safety profile is covered. The description adds value beyond that by declaring the return shape ('每组例数与合计'), which matters since no output schema exists, and by framing results in design terms ('设计口径'). It does not state handedness of the returned numbers beyond the per-group/total split or whether dropout inflation is applied to the reported total.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The labelled USE WHEN / ALIASES / RETURNS structure is front-loaded and scannable for an agent. The alias list is long but serves a real disambiguation purpose (Chinese and English phrasings), and no sentence is filler.

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 6-parameter, zero-required computation tool with no output schema, the description supplies both the trigger conditions and the return format, which is the essential missing context. Minor gaps remain around default behavior when required-by-design fields are omitted and how dropout interacts with the reported n.

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 (sd, alpha, power, effect, dropout, sample_type) is already documented in the schema with defaults noted for alpha and power. The description only implicitly adds meaning by listing the four design types, which mirrors the sample_type description rather than adding semantics such as which parameters are ignored for a given design.

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 concrete verb+resource (calculate sample size / power) and enumerates the four supported designs (two means, two proportions, correlation, survival), which matches the sample_type field. It is clearly distinguishable from siblings like animal_sample_size or qpcr_bayesian_design, which address different subject populations.

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?

The 'USE WHEN' block gives explicit triggers, including the 'solve for power' variant, so an agent knows the tool is bidirectional. It stops short of naming alternatives or exclusions (e.g., when to prefer animal_sample_size or qpcr_bayesian_design), so routing between similar powered-design tools is left to inference.

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