Skip to main content
Glama

hypothesis_test

Read-onlyIdempotent

Perform z-tests, t-tests, or chi-squared tests to obtain test statistics, p-values, and rejection decisions at a chosen significance level.

Instructions

Perform statistical hypothesis tests: z-test, t-test, or chi-squared test. Returns test statistic, p-value, and rejection decision.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "test": "<test>"
    },
    "name": "hypothesis_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
tailNoTail type (default two)
testYesType of test
alphaNoSignificance level (default 0.05)
expectedNoExpected frequencies (for chi2)
observedNoObserved frequencies (for chi2)
sample_stdNoSample standard deviation (for t-test)
sample_meanNoSample mean (for z/t tests)
sample_sizeNoSample size (for z/t tests)
population_stdNoPopulation standard deviation (for z-test)
population_meanNoPopulation mean / null hypothesis value

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true, idempotentHint=true, no destruction, so the safety profile is covered. The description adds the return shape (statistic, p-value, rejection decision), which is genuine value with no output schema present. It says nothing about error conditions, e.g. chi2 called without observed/expected, but with annotations in place a 3 is fair.

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?

Two sentences, zero filler, front-loaded with purpose and followed by returns. Nothing could be removed without losing information.

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?

With 10 parameters, no output schema, and a mode-selector parameter, the description is thin on the one thing an agent most needs: which parameter set goes with which test mode. It compensates by stating the return values, but the valid parameter combinations remain inferable only from scattered schema hints.

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 coverage is 100% and each property already documents its role, including which test it belongs to ('for chi2', 'for t-test'). The description repeats the test enum but contributes no additional parameter meaning such as which combinations are mutually valid. Baseline 3 applies when the schema does the heavy lifting.

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 gives a specific verb ('Perform') plus a resource ('statistical hypothesis tests') and enumerates the three supported variants (z, t, chi-squared), so an agent immediately knows its function. It stops short of distinguishing itself from nearby stats siblings such as zscore_calculate, normal_distribution, or statistics_calc, which do not perform inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to pick a z-test vs a t-test vs chi2, no prerequisite conditions (large sample and known population sigma for z, sample_std for t, observed/expected pairs for chi2), and no mention of alternatives. The only routing signal is the enum list, which an agent could get from the schema alone.

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