Skip to main content
Glama
omnioperand-mcp

omnioperand-mcp

omni_cohen_d_effect_size

Calculate Cohen's d, Hedges' g, pooled standard deviation, and U3 non-overlap from group means, standard deviations, and sample sizes to quantify standardized treatment effects in clinical trials.

Instructions

Biostatistical Cohen's d Effect Size & Standardized Mean Difference Calculator. Calculate Cohen's d, Hedges' g (unbiased small-sample adjustment), and pooled standard deviation to quantify standardized effect sizes across clinical trials. Discipline: BIOTECH. Governing mathematical model / formula: Cohen's d = (μ₁ - μ₂) / s_pooled | s_pooled = √[((n₁ - 1)·s₁² + (n₂ - 1)·s₂²) / (n₁ + n₂ - 2)].

USAGE GUIDELINES:

  • WHEN TO USE: Invoke for deterministic calculation of cohens_d_effect_size (Cohen's d Effect Size), hedges_g_unbiased (Hedges' g (Small-Sample Corrected)), pooled_standard_deviation (Pooled Standard Deviation (s_pooled)), non_overlap_u3_percentage (Cohen's U₃ Distribution Non-Overlap) using treatment_group_mean_m1 (Treatment Group Mean (μ₁) in units), control_group_mean_m2 (Control Group Mean (μ₂) in units), treatment_std_dev_s1 (Treatment Standard Deviation (s₁) in SD), control_std_dev_s2 (Control Standard Deviation (s₂) in SD), sample_size_per_group_n (Sample Size Per Group (n) in n/group). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.

  • WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.

  • SIBLING ROUTING: Use this dedicated specialist tool for 'Biostatistical Cohen's d Effect Size & Standardized Mean Difference Calculator' rather than generic dispatchers like omni_universal_query. For cross-discipline dynamic dispatch, see omni_universal_query.

BEHAVIOR & SAFETY:

  • Pure deterministic computation with machine floating-point precision.

  • Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.

  • Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.

RETURNS:

  • Structured JSON object containing:

    • status (string): "success" on valid execution or "error" if validation fails

    • calculator (string): "cohen-d-effect-size"

    • category (string): "biotech"

    • name (string): "Biostatistical Cohen's d Effect Size & Standardized Mean Difference Calculator"

    • formula (string): Governing mathematical formula string

    • inputs (object): Echoed input parameter dictionary with applied defaults

    • metrics (object): Dictionary of computed outputs:

      • metrics.cohens_d_effect_size (Cohen's d Effect Size): Formatted display string (e.g. '0.81 (Large Effect Size)')

      • metrics.hedges_g_unbiased (Hedges' g (Small-Sample Corrected)): Formatted display string (e.g. '0.80 Unbiased')

      • metrics.pooled_standard_deviation (Pooled Standard Deviation (s_pooled)): Formatted display string (e.g. '9.00 SD Units')

      • metrics.non_overlap_u3_percentage (Cohen's U₃ Distribution Non-Overlap): Formatted display string (e.g. '79.1% Superior to Control Mean')

    • execution_time_ms (number): Latency in milliseconds.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "omni_cohen_d_effect_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
control_std_dev_s2NoControl Standard Deviation (s₂) (SD). Standard deviation of control cohort. Default: 8.8. Min: 0.1. Max: 500.
treatment_std_dev_s1NoTreatment Standard Deviation (s₁) (SD). Standard deviation of treatment cohort. Default: 9.2. Min: 0.1. Max: 500.
control_group_mean_m2NoControl Group Mean (μ₂) (units). Mean outcome score in control placebo cohort. Default: 41.2. Min: -1000. Max: 1000.
sample_size_per_group_nNoSample Size Per Group (n) (n/group). Patients in each arm (assuming equal cohorts). Default: 45. Min: 3. Max: 10000.
treatment_group_mean_m1NoTreatment Group Mean (μ₁) (units). Mean outcome score in experimental cohort. Default: 48.5. Min: -1000. Max: 1000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does so: it declares the tool read-only, idempotent, stateless, and side-effect free, and explains that out-of-bounds inputs return a diagnostic error rather than throwing. It does not discuss precision limits or edge cases such as zero variance, which keeps it short of a 5.

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

Conciseness3/5

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

Purpose and formula are front-loaded, but the body is padded with repeated parenthetical labels (e.g. 'hedges_g_unbiased (Hedges' g (Small-Sample Corrected))') and a long RETURNS section that duplicates field names. The content is useful but noticeably verbose for a five-parameter pure calculator.

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?

No output schema exists, and the description compensates by enumerating the return object's fields, including each metric's display format. Combined with the formula and validation behavior, an agent has enough to call and interpret the tool, though edge-case behavior (e.g. n<3 or zero SD) is only implied by schema bounds.

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 the schema already documents every parameter with units, defaults, and min/max bounds. The description restates the parameter names with symbols and units but adds no new semantics such as interaction constraints or how n is used in the pooled formula beyond what the schema shows.

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 ('Calculate Cohen's d, Hedges' g, and pooled standard deviation') and supplies the governing formula, so the agent knows exactly what computation is performed. It also names the generic dispatcher it should not be confused with, making it distinguishable from 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?

Provides an explicit WHEN TO USE list enumerating the computed metrics and required inputs, plus a WHEN NOT TO USE clause and sibling routing to omni_universal_query. The exclusion ('no qualitative evaluations') is somewhat boilerplate, but the positive routing guidance is concrete.

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