Skip to main content
Glama

chi_square_independence

Determine if two categorical variables in a contingency table are independent. Use this test to assess whether group membership relates to an outcome, providing the table and significance level.

Instructions

Test whether the row and column variables of a contingency table are independent (e.g. "does group membership relate to outcome").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alphaNo
tableYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. The description reveals the test's hypothesis and input structure, but does not mention that it computes a p-value, assumes certain conditions (e.g., sample size), or how it handles invalid input (e.g., zero rows). It adds basic behavioral context but lacks depth for a statistical test tool.

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?

The description is a single sentence with a parenthetical example that is concise and front-loaded with the main action. It avoids unnecessary words while still providing a concrete use-case hint. The example adds value without making the description overly long.

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?

Given the lack of output schema, no annotation coverage, and moderate complexity (a statistical test with assumptions), the description is only partially complete. It states the goal but leaves out output behavior, assumptions, error cases, and parameter details. The tool is still usable with domain knowledge, but an agent might misinterpret the table format or ignore alpha.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate by explaining both the required parameter 'table' and optional 'alpha'. The description only mentions the table conceptually without describing its exact format (e.g., 2D array of numbers). Alpha is completely omitted. There is no guidance on default behavior or additional semantics beyond the schema.

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 clearly states the tool performs a chi-square test of independence on a contingency table, with a helpful parenthetical example. The verb 'Test whether...are independent' and resource 'contingency table' are specific, and the example distinguishes this from the sibling chi_square_goodness_of_fit, making the purpose clear.

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?

The description implies this tool is used for testing independence between categorical variables, which differentiates it from chi_square_goodness_of_fit (which tests distribution fit). However, there is no explicit guidance on when not to use it, prerequisites (e.g., expected cell count assumptions), or comparisons with alternative tests like Fisher's exact test.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrnh/rigor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server