Skip to main content
Glama
PhilipAD

Health Export AI

by PhilipAD

correlate_metrics

Read-onlyIdempotent

Calculate Pearson correlation between two health metrics' daily values, with optional lag from 0 to 3. Returns aligned pairs, r-value, and means, noting association not causation.

Instructions

Pearson correlation between two metrics' daily values: {metricA, metricB, lag (0 to 3, default 0), start, end}. lag pairs metricA on day d with metricB on day d+lag, so lag 1 compares against the FOLLOWING day. Returns alignedPairs, r (withheld below 10 aligned pairs), and both means. The answer always carries the association-not-causation caveat; treat every r as alignment in this file, not mechanism.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoYYYY-MM-DD
lagNo0 to 3 days. lag 1 pairs metricA on day d with metricB on the following day.
startNoYYYY-MM-DD
metricAYes
metricBYes
Behavior5/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description discloses important quirks: r is withheld below 10 aligned pairs, the function returns both means, and the answer always carries an association-not-causation caveat. It also clarifies lag orientation clearly. This is exactly the kind of behavioral information an agent needs and cannot infer from annotations.

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?

Three concise, information-dense sentences. Every sentence contributes: the first defines the operation, the second explains the lag and return values, the third provides the necessary interpretation caveat. There is no filler or repetition of schema content.

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?

For a read-only correlation tool, the description covers the key computation, lag behavior, return fields, sample size threshold, and the contextual caveat. Its main omission is clear default behavior for unlimited or unspecified start/end windows, and it does not describe how alignedPairs is structured. Given there is no output schema, slightly more return-format exposure would make it complete.

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 description adds useful meaning beyond the schema: it explains lag direction, default value, and relationship between aligned daily values. It also identifies the roles of metricA and metricB. Schema coverage is about 60%, and the description compensates for the missing metricA/metricB descriptions, though it does not elaborate on start/end bound semantics.

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?

States a specific operation with a clear verb and resource: 'Pearson correlation between two metrics' daily values.' This is distinct from sibling tools like get_trends or compare_periods because it focuses on pairwise correlation rather than trend direction or period comparison.

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 correlation intent is clear, and the lag semantics are explicitly explained, but the description does not state when to prefer this over alternatives like get_trends, compare_periods, or list_metrics. The decision context is implied rather than explicit, and no exclusions or alternative tools are named.

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/PhilipAD/health-export-mcp'

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