Skip to main content
Glama

Stat Distance Correlation

stat_distance_correlation

Detect any dependence between two variables, linear or non-linear, using a bootstrap-based distance correlation that is zero only when they are independent. Use it when Pearson r is non-significant or relationships may be non-monotonic.

Instructions

Distance correlation — detects any dependence, linear or not.

WHEN TO USE

  • Before concluding "no relationship" from a non-significant Pearson r. Distance correlation is zero if and only if the variables are independent.

  • When a non-linear or non-monotonic relationship is plausible.

WHEN NOT TO USE: as a replacement for interpretable effect sizes — the coefficient has no simple direction or magnitude reading.

Bootstrap-based, so it is slower; reduce n_boot for exploratory passes.

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": {
      "name": "<name>",
      "x": "<x>",
      "y": "<y>"
    },
    "name": "stat_distance_correlation"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
nameYes
seedNo
n_bootNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral burden. It usefully discloses that the tool is bootstrap-based, slower, and tunable via n_boot, but it does not state read-only/data-safety behavior or other operational constraints.

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?

The description is front-loaded, structured into WHEN TO USE and WHEN NOT TO USE sections, and every sentence contributes useful selection or performance guidance.

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?

It covers usage conditions and computational cost well, and an output schema exists for return values. However, with 5 parameters and 0% schema coverage, the description is incomplete on parameter meaning for a tool of this complexity.

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 should compensate for the five undocumented parameters. It explains only n_boot's performance tradeoff and does not clarify x, y, name, or seed semantics, leaving most parameters unexplained.

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?

The description states a specific statistical method and what it detects: dependence of any form, linear or not. It explicitly contrasts this with a non-significant Pearson r, which helps distinguish it from the sibling correlation tools.

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

Usage Guidelines5/5

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

It gives explicit WHEN TO USE conditions, including checking after a non-significant Pearson r and when non-linear or non-monotonic relationships are plausible. It also gives an explicit WHEN NOT TO USE condition about effect-size interpretation, leaving little ambiguity.

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