Skip to main content
Glama

stats.cohens_d

Read-onlyIdempotent

Calculate Cohen's d and Hedges's g effect size for two independent samples, returning a six-significant-digit result for small-sample group comparisons.

Instructions

두 독립 표본의 효과크기 Cohen's d와 소표본 보정값 Hedges's g를 계산한다. d = (a 평균 - b 평균) / 풀드 표준편차이며 a 평균이 크면 양수다. a, b는 Decimal 문자열 각 2개 이상이고 풀드 표준편차가 0이면 오류다. 결과는 유효숫자 6자리 문자열이다. 대응표본(전후 비교)에는 쓰지 않는다.

Input Schema

NameRequiredDescriptionDefault
aYes
bYes

Output Schema

NameRequiredDescriptionDefault
dYes
n_aYes
n_bYes
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
hedges_gYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations the description adds real behavioral facts: minimum of 2 values per group, an error when pooled SD is zero, and a 6-significant-digit string output. It does not mention the equal-variance assumption behind the pooled SD, which is the one remaining behavioral caveat an agent might need.

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?

Four compact sentences ordering purpose, formula/sign, input constraints plus error condition, output format, and the exclusion. Nothing is redundant and the most decision-relevant information comes first.

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 two-parameter deterministic calculation with an output schema, the definition covers inputs, error case, sign convention, and output precision. The only gap is the untold assumption of equal variances implied by pooling, which matters for correct interpretation.

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 0% (only titles "A" and "B"), but the description compensates by specifying that a and b are arrays of Decimal strings with at least two elements, and by defining a's sign direction. That covers both parameters meaningfully, though it doesn't say whether a is the treatment or control group.

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?

States a specific verb and resource (computes Cohen's d and Hedges' g), gives the exact formula, and declares the sign convention. An agent can distinguish it from stats.ttest_two_sample or stats.ttest_paired without opening any schema.

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?

Explicitly scopes the tool to two independent samples and states the exclusion "대응표본(전후 비교)에는 쓰지 않는다", which routes the agent away from the paired-sample tools. It stops short of naming the specific alternative to use instead (e.g., a paired effect-size route), so it is clear but not fully prescriptive.

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

Deploy Server

Other Tools