Skip to main content
Glama

Antigravity x402 & MCP Gateway

compute_portfolio_tail_risk

[0.010000 USDC via x402] Computes exact-Decimal daily 95% and 99% Value at Risk (VaR), 95% Expected Shortfall (CVaR), annualized volatility, max drawdown, Sharpe, Sortino, Probabilistic/Deflated Sharpe confidence, and minimum-variance BTC short hedge USD notional from aligned DefiLlama daily price history.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "compute_portfolio_tail_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetsNoPortfolio weights (shorthand tickers BTC/ETH/SOL/LINK/UNI/AAVE/ARB/OP or 'coingecko:...' IDs).
lookback_daysNoHistorical daily lookback window in UTC days between 14 and 90 (default 60).
portfolio_value_usdNoTotal portfolio notional in USD for dollar VaR/CVaR and hedge sizing (default '100000').
x402_payment_signatureNoOptional base64 x402 PAYMENT-SIGNATURE header token (0.010000 USDC on Base eip155:8453 or Polygon eip155:137). Omit to receive the live x402 quote.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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 carries the full burden and does disclose the key non-obvious traits: this is a paid call (0.010000 USDC via x402), the accepted payment rails (Base/Polygon) appear in the schema, and results are computed from DefiLlama daily history with exact-Decimal arithmetic. It does not state failure behavior when history is too short, when coin tickers are unresolvable, or whether weights must sum to 1, which keeps it below 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?

A single dense sentence with no filler, front-loaded with the cost tag before the capability statement. The long metric enumeration is justified because there is no output schema to document return values, though the cost marker competing with the purpose statement slightly blunts the opening.

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 paid compute tool with no annotations and no output schema, the enumeration of returned metrics plus the x402 quote mechanism covers what an agent needs to decide and call. The remaining gap is operational: no statement on how short price history or non-normalized weights are handled, which matters given the 14-90 day lookback constraint.

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 all four parameters (weights, lookback bounds, notional, payment signature) already carry semantics. The description only adds the pricing marker that contextualizes x402_payment_signature; it adds nothing about weight normalization or ticker fallback behavior beyond the schema.

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?

Opens with a specific verb ('Computes') and an enumerated set of outputs (VaR 95/99, CVaR, annualized volatility, max drawdown, Sharpe, Sortino, Probabilistic/Deflated Sharpe, minimum-variance BTC short hedge notional) plus the data source (aligned DefiLlama daily price history). No sibling tool overlaps this domain, so the agent can identify it unambiguously.

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?

Usage is implied by the metric list rather than stated, and there are no explicit when-not conditions or named alternatives. The one genuine routing hint is in the payment flow: the schema notes that omitting x402_payment_signature returns a live quote, which tells the agent how to probe cost before paying.

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.