Skip to main content
Glama

Agent safety checks: prompt-injection scan, honeypot check, x402 preflight + crypto data (USDC/x402)

Correlation matrix for position sizing and hedging

correlation_matrix
Read-only

Concentration-risk check for a crypto portfolio: Pearson correlation of 1h log returns between up to 12 Binance spot pairs over up to 200 closed hours, with the most and least correlated pairs, for position sizing and hedging. 0.25 USDC base (new payers 0.25, >10 payments 0.175; 5 pack calls). After: regime for the least correlated pairs (the result's next field has the exact call).

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": {
      "symbols": "<symbols>"
    },
    "name": "correlation_matrix"
  }
}

Input Schema

NameRequiredDescriptionDefault
barsNo
symbolsYes
payment_txNoHash of a USDC transfer on Base to payTo (≥ the price, ≤ 72 h old) instead of an x402 signature.
bundle_tokenNoToken from buy_signal_pack, buy_subscription (pro/desk) or buy_enterprise instead of paying per call.
payer_addressNoWallet you pay from: the payment-required error quotes your tier (0 payments base price (new-payer surcharge paused), 1-10 base, >10 -30 %) and, from the third payment, an upgrade with your own spend.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / payer_address / description
      Previous value: -"Wallet you pay from: the payment-required error quotes your tier (0 payments +50 %, 1-10 base, >10 -30 %) and, from the third payment, an upgrade with your own spend."New value: +"Wallet you pay from: the payment-required error quotes your tier (0 payments base price (new-payer surcharge paused), 1-10 base, >10 -30 %) and, from the third payment, an upgrade with your own spend."
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds genuinely non-redundant context: data source (Binance spot), closed-hours-only returns, pair cap of 12, and a pricing model with tiers and pack calls. It does not discuss latency, failure modes, or what happens with insufficient history below the minimum bars.

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?

Front-loaded with the core computation and scope, followed by commercial terms and a next-step pointer in a logical order. The pricing parenthetical is dense and slightly awkwardly bracketed, but every sentence carries information.

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?

No output schema exists, so the description must convey the return shape, and it does name the most/least correlated pairs plus a 'next' field. Combined with the schema's payment documentation, an agent has enough to call it correctly; the remaining gap is edge-case behavior for short or thin history.

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?

With 60% schema coverage, the description compensates for the key analytical parameters: it clarifies that symbols are Binance spot pairs capped at 12 and that bars means closed 1h hours. The three payment parameters are left entirely to the schema, which is acceptable since their descriptions are already detailed there.

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?

The description names a specific computation and resource: Pearson correlation of 1h log returns across up to 12 Binance spot pairs over up to 200 closed hours, returning the most and least correlated pairs. It is clearly distinct from a signal/regime tool, though sibling differentiation is only indirect via the 'After: regime' pointer rather than an explicit contrast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear use case ('position sizing and hedging') and an explicit sequencing rule: follow with regime for the least correlated pairs, with a pointer to the result's next field. It stops short of stating when NOT to use it, e.g. for a single-pair or non-Binance portfolio.

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