Skip to main content
Glama

BRAINIAC Statistics & Quality Engineering

Run a chi-square test

statistics_chi-square-test
Read-onlyIdempotent

Chi-square test of independence (with optional Yates correction), goodness of fit, Fisher's exact test for 2x2 tables and Cramer's V, with expected counts and a low-expected-cell warning. Price $0.02 USDC. POST /api/v1/statistics/chi-square-test. An unpaid call returns the x402 payment terms and does not run.

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": {
      "kind": "<kind>"
    },
    "name": "statistics_chi-square-test"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYeskind, string, one of independence, goodness_of_fit. Required.
tableNotable, array. Optional.
yatesNoyates, boolean. Required.
fisherNofisher, boolean. Required.
observedNoobserved, array. Optional.
expectedProportionsNoexpectedProportions, array. Optional.

Output Schema

NameRequiredDescriptionDefault
dfNodf. Number.
yatesNoyates. Boolean.
fisherNofisher. Object.
pValueNopValue. Number.
sourcesNosources. Array.
cramersVNocramersV. Number.
expectedNoexpected. Array.
chiSquareNochiSquare. Number.
limitationsNolimitations. Array.
lowExpectedCellsNolowExpectedCells. Number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=true, so the safety profile needs little elaboration. The description still contributes behavior the annotations cannot express: a per-call price of $0.02 USDC, the concrete endpoint POST /api/v1/statistics/chi-square-test, and critically the failure mode that an unpaid call returns x402 payment terms and does not execute the test. That is exactly the kind of non-obvious operational behavior an agent must know before invoking.

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?

Three sentences, all substantive, with the analytical capability stated first and the payment/endpoint detail trailing. The x402 and endpoint sentences are compact even though the endpoint path largely restates the tool name. No filler or redundant restatement of the title beyond that path.

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 tool with an output schema, full schema coverage and rich annotations, the description covers the capability, cost, transport and payment failure mode. What is missing is the conditional parameter contract — which fields apply to which kind — and any note on validation rejects for malformed tables. Given the output schema handles return values, this is close to complete.

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 description coverage is 100%, so the baseline is 3, and the schema already labels each field. The description goes further by attaching meaning to otherwise terse parameters: yates maps to the Yates continuity correction, fisher to the 2x2 exact test, and table versus observed/expectedProportions map to the two analysis kinds. It does not state explicitly that table is required for independence while observed/expectedProportions are required for goodness_of_fit, which is the remaining meaningful gap.

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 concrete verb and a specific statistical resource, enumerating the supported variants (independence with optional Yates correction, goodness of fit, Fisher's exact for 2x2, Cramer's V) plus the outputs (expected counts, low-expected-cell warning). An agent can tell exactly what computation it gets. It stops short of naming which sibling to use instead — e.g. statistics_nonparametric-tests or statistics_t-test — so it does not fully satisfy the sibling-differentiation bar for a 5.

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

Usage Guidelines3/5

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

Usage is implied by the statistical content: categorical/contingency-table data routes here, and the description effectively maps the kind enum to two workflows. However, there is no explicit when-to-use versus alternatives, no statement that continuous-data tests belong to statistics_t-test or statistics_anova, and no guidance on choosing between independence and goodness_of_fit beyond the enum values.

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