Skip to main content
Glama

Diversification check

diversification_check
Read-onlyIdempotent

Diversification check: how many independent bets a basket of coins really is. Give the coins (and optionally the window: 90, 365 or 730 days): you get the average correlation between the pairs on real daily returns, the number of independent bets it works out to, each coin's correlation with bitcoin — and what the equal-weight basket did on the days bitcoin closed 3% or more down: how often it fell too, by how much, and its worst such day. Dead coins included.

Use when a basket of two or more coins is called diversified or hedged. For one coin use drawdown_check; for two or three coins side by side on every check, coin_comparison.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysYesWindow ending on the last day of the data: 90, 365 or 730. Defaults to 365.
coinsYesTickers or full pairs, e.g. ["BTC", "ETH", "SOL"]. A comma-separated string also works. One we do not hold comes back with the list.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNofalse when we do not hold that data. Never a zero standing in for an answer.
errorNono_data when ok is false.
modelNoThe assumptions, stated.
reasonNoWhy, in one sentence, and what we do have instead.
sourceNoThe public file these numbers come from.
try_insteadNoWhen ok is false: the closest call that does answer, ready to send (tool, arguments, and what changed).
btc_bad_daysNoThe days bitcoin closed 3% or more down: how many, on what share of them the basket fell too, its median and worst move. Diversification that vanishes on those days was never there.
same_coin_inNoWhen ok is false because this tool lacks the coin: the other tools that hold it, each with arguments ready to send.
independent_betsNoN / (1 + (N-1)*avg_corr). Five coins that move as one are one bet; five that ignore each other are five.
all_coins_we_holdNoWhat every coin we hold, at equal weights, adds up to — the ceiling, for comparison.
correlation_with_btcNoEach coin's correlation with bitcoin in the window.
average_pair_correlationNoPearson correlation of daily log returns, averaged over every pair in the basket.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "coins": [
      +      "btc",
      +      "eth"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / same_coin_in
      Added value: +{
      +  "description": "When ok is false because this tool lacks the coin: the other tools that hold it, each with arguments ready to send.",
      +  "type": "array"
      +}
    • addedOutput schema / properties / try_instead
      Added value: +{
      +  "description": "When ok is false: the closest call that does answer, ready to send (tool, arguments, and what changed).",
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / days / default
      Added value: +365
    • addedInput schema / properties / days / enum
      Added value: +[
      +  90,
      +  365,
      +  730
      +]
  3. First observed

TDQS

A4.3/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), so the bar is lower. The description adds real behavioral context: the outputs returned, that correlations are computed on 'real daily returns', and that dead coins are included in the basket. It does not discuss edge cases like minimum basket size or error behavior, so not a 5.

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?

Purpose is front-loaded and the routing sentence is tight, but the first paragraph is a dense run-on that strings together four distinct outputs, making it slightly list-like. Most of it earns its place; minor trimming would sharpen it.

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 an output schema present, the description needn't detail return values, and it is otherwise complete: trigger, alternatives, params, and key behaviors all covered. The only gap is the optional/required window ambiguity, which slightly undermines caller confidence.

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 both parameters are documented in structured form, making 3 the baseline. The description reinforces the purpose of the coins list and the 90/365/730 window, but also introduces a mismatch by calling the window 'optional' while the schema lists days as required — a small inconsistency rather than added value.

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 names a specific analysis (how many independent bets a coin basket really is) and enumerates the concrete outputs: average pairwise correlation, independent-bet count, per-coin BTC correlation, and equal-weight basket behavior on days BTC fell 3%+. This clearly distinguishes it from siblings like drawdown_check and coin_comparison.

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 an explicit trigger ('Use when a basket of two or more coins is called diversified or hedged') and routes to named alternatives with conditions: drawdown_check for one coin, coin_comparison for two or three coins side by side. Nothing is left to inference.

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