Skip to main content
Glama

Correlation of two metrics

correlate_metrics
Read-onlyIdempotent

How closely two metrics move together over a window: the Pearson correlation of their period-over-period changes (log changes when both stay above zero) and of their levels, and the rolling correlation of changes, from the two exact series. For example BTC's price against its exchange balance, or ETH's price against BTC's.

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": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "correlate_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesA metric id as get_asset_metrics lists it, for example ckh.SpotPrice or eth.PriceUSD.
bYesA metric id as get_asset_metrics lists it, for example ckh.SpotPrice or eth.PriceUSD.
endNoExclusive UNIX seconds UTC. Leave it out to read up to the latest observation.
startNoInclusive UNIX seconds UTC. Without it fetch_metric reads the latest year of daily observations (ten years of weekly ones, every monthly and yearly one).
windowNoPeriods in the rolling correlation.
intervalNoResolution: 24h daily, 1w weekly, 1M monthly. get_metric_metadata gives the intervals a metric offers.24h

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's job is to add methodological behavior, and it does: it discloses the statistical method, the log-transform rule, and that results come from the two exact series rather than a resampled or filled join. It still omits edge behavior such as what happens with non-overlapping series, minimum observation counts, or how the rolling window warms up.

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?

One dense, front-loaded sentence with a parenthetical qualifier and a trailing example clause; nothing is wasted. The nested clauses around the three computed quantities make it slightly harder to parse than it needs to be, but the definition leads with the point of the tool.

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 carries the burden of describing returns, and it does name the three quantities produced, which is enough for an agent to know what comes back. Remaining gaps are around failure and coverage behavior for misaligned or sparse series, which matters for a six-parameter statistical tool.

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 description coverage is 100%, so every parameter is already documented, and the description adds little parameter-specific meaning beyond the phrase 'over a window' echoing the window field. It does implicitly explain that interval resolution affects both series, but it gives no guidance on aligning metrics available at different intervals.

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 computed resource: the Pearson correlation between two named metrics, broken into changes (log changes when both stay positive), levels, and a rolling correlation of changes. That verb-plus-output specificity distinguishes it instantly from every sibling, which fetch, screen, or chart single metrics.

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 two examples ('BTC's price against its exchange balance, or ETH's price against BTC's') give a concrete sense of intended use, so the usage is implied rather than stated. There is no explicit when-to-use versus when-not, no naming of an alternative approach such as fetching both series separately with fetch_metric, and no stated prerequisites like the two metrics having to share an interval.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources