Skip to main content
Glama

util_chi_square

Read-only

Chi-square test (independence or goodness of fit) with Fisher exact — Categorical data test. table= contingency table, rows separated by ; and cells by , (e.g. 30,10;20,40) for a test of independence: chi-square, df, p, G-test, Cramer's V, expected counts, adjusted residuals, low-expected-cell warning; 2x2 tables add Yates correction, Fisher exact p, odds ratio and relative risk. Or observed= counts with optional expected= counts/proportions (default uniform) and ddof= for goodness of fit with Cohen's w. alpha= default 0.05. Verdict ASSOCIATED/NO_EVIDENCE_OF_ASSOCIATION or DOES_NOT_FIT/CONSISTENT_WITH_EXPECTED. Offline. Price: $0.002 USDC (Base, via x402).

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": {
      "table": "<table>"
    },
    "name": "util_chi_square"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableYes30,10;20,40

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes far past the readOnly/openWorld annotations: it enumerates the returned statistics (chi-square, df, p, G-test, Cramer's V, expected counts, adjusted residuals), flags a low-expected-cell warning, discloses the verdict vocabulary (ASSOCIATED/NO_EVIDENCE_OF_ASSOCIATION, DOES_NOT_FIT/CONSISTENT_WITH_EXPECTED), and states 'Offline' plus pricing. That is exactly the context annotations cannot carry.

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?

Front-loaded with the test name and mode, and every clause carries substantive information (delimiters, outputs, verdicts). It is dense semicolon-chained prose rather than structured bullets, which makes it harder to scan but not padded.

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 no output schema, the description does explain the returned statistics and verdict strings, so the main gap is covered. But the mismatch between the single-parameter schema and the observed/expected/ddof/alpha arguments it advertises leaves an agent unsure what is actually accepted, and no error behavior is described.

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?

The schema only declares `table` with the bare example '30,10;20,40'; the description supplies the row/cell delimiter syntax, the 2x2 caveat, and the default for alpha. However, it also describes observed=, expected=, ddof= that are not in the schema at all, which adds meaning but risks an agent passing unsupported arguments.

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?

Names the exact statistical test and both modes ('independence or goodness of fit') plus the Fisher exact add-on, which cleanly separates it from siblings like util_anova (continuous) and util_regression. An agent can select this without opening the 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 maps inputs to modes: 'table= contingency table ... for a test of independence' vs 'observed= counts with optional expected= ... for goodness of fit', and notes 2x2 adds Yates/Fisher/odds ratio. It gives clear usage context but never states exclusions or when a different tool is the better choice.

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