Skip to main content
Glama

correlation_calc

Read-onlyIdempotent

Computes Pearson correlation, r-squared, covariance, and linear regression for two numeric arrays, helping quantify relationships and trends between datasets.

Instructions

Compute Pearson correlation coefficient, r-squared, covariance, and linear regression between two numeric arrays.

Input Schema

NameRequiredDescriptionDefault
xYesFirst data array
yYesSecond data array

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds that multiple derived statistics are returned in one call, but says nothing about edge-case behavior (unequal array lengths, zero variance producing undefined r) or output shape. Adequate but not rich.

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?

A single front-loaded sentence with zero filler that names every computed quantity up front. Nothing needs trimming and nothing is buried.

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?

With no output schema, the description at least enumerates the returned statistics, which is the key missing piece. It falls short only on validation behavior and the exact shape of the regression output — minor for a two-parameter math utility.

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% with two clearly typed array parameters, so the schema does the heavy lifting. The description confirms the inputs are 'two numeric arrays' but adds no constraints beyond the schema, such as requiring equal lengths or matched ordering. Baseline 3 applies.

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?

States a specific verb ('Compute') and enumerates the exact statistics produced: Pearson r, r-squared, covariance, and linear regression. This distinguishes it from general statistical siblings like descriptive_stats or regression_fit, though it never explicitly names which sibling to prefer when doing plain regression fitting.

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?

There is no guidance on when to use this rather than regression_fit, descriptive_stats, variance_calc, or cosinesim_compare. No mention of prerequisites such as equal-length arrays or minimum observations. The agent must infer all usage context from the name 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