Skip to main content
Glama

Permutation test / 置换检验

permutation_test
Read-only

Permutation test / 置换检验 | USE WHEN: exact/permutation test when t-test assumptions fail or n is tiny | ALIASES: 置换检验, 随机化检验, permutation, 精确检验, 小样本非参数, resampling | RETURNS: 置换 P 值

Input Schema

NameRequiredDescriptionDefault
group1Yes第一组数值
group2Yes第二组数值
n_permNo置换次数,默认 10000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds the return value ('置换 P 值') in lieu of an output schema, which is useful, but it omits behavioral details that matter for a resampling procedure: whether the p-value is one- or two-sided, whether it is exact or Monte Carlo based, and there is no seed parameter or reproducibility note.

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 pipe-delimited label/USE WHEN/ALIASES/RETURNS layout is front-loaded and scannable with no filler prose. The ALIASES block is bulk for search matching rather than agent reasoning, which is slightly wasteful but standard for this family.

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

Completeness3/5

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

For a three-parameter, read-only statistics tool with full schema coverage and annotations, the definition covers purpose, trigger and return value adequately. However, with no output schema it should state what the result contains beyond a p-value (test statistic, group means, CI) and clarify one- vs two-sided behavior, both of which an agent needs to report results correctly.

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 group1, group2 and n_perm (default 10000) are already documented in the schema, and the provided example shows the expected shape. The description adds nothing about parameter semantics — not the sample-size limits, array-length constraints, or the cost implications of raising n_perm — so baseline 3 applies.

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 names a specific statistical procedure (permutation/exact test) and signals its role versus parametric alternatives via 'when t-test assumptions fail'. It does not explicitly say it is a two-group comparison, and it never names a concrete sibling (e.g. stats_toolbox or tukey_hsd) it should be chosen over, so it stops short of full differentiation.

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' clause gives an explicit trigger: assumption violations in a t-test or very small n. There is no when-not guidance (e.g. for paired data, more than two groups, or when normality holds and a t-test is preferred) and no named alternative tool, so the routing guidance is clear but one-sided.

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