Skip to main content
Glama

correlate

Compute Pearson or Spearman correlation between two Garmin metrics, with optional time lag to find strongest relationship and Bonferroni-adjusted p-value.

Instructions

Pearson/Spearman correlation between two metrics (default: last 30 days).

Positive lag_days pairs metric_a on day D with metric_b on D+lag; scan_lags=True searches lags -7..+7 for the strongest relationship and returns it with a Bonferroni-adjusted p-value; if that is >= 0.05, note says the lag may be chance and a wider range is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
startNo
lag_daysNo
metric_aYes
metric_bYes
scan_lagsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description fully discloses the statistical behavior: lag pairing, scan_lags with Bonferroni adjustment, and the chance-lag note. This goes beyond basic semantics and informs the agent about edge cases.

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 compact, front-loads the core purpose, and uses precise technical language. Every sentence adds value, with no fluff or repetition.

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?

The tool has 6 parameters and no output schema; the description explains the lag-related behavior but omits details on start/end parameters and the exact return structure. For a statistical tool, an agent would benefit from knowing the result format, which is only partially hinted.

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 0%, so the description must explain all parameters. It clearly covers lag_days and scan_lags, and implies metric_a/metric_b, but start and end are only implied via 'default: last 30 days' without format or override details, leaving a gap.

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 verb (correlate), resource (two metrics), and method (Pearson/Spearman), clearly distinguishing it from siblings like anomalies or baselines. The default time range adds context without ambiguity.

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?

It mentions the default time range and explains the lag parameters, but does not explicitly say when to prefer this tool over alternatives or provide exclusions. The usage context is implied rather than stated.

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