Skip to main content
Glama
x402-preflight-mcp

x402-preflight-mcp

by animus3d

sharpe_cvar_tearsheet

Computes Sharpe, Sortino, Calmar, max drawdown, VaR/CVaR, skewness, kurtosis, and win rate from returns or prices to assess portfolio risk and performance.

Instructions

[x402 $0.04 USDC on Base/Solana] Computes Sharpe, Sortino, Calmar, Max Drawdown, VaR(95/99), CVaR(95/99), skewness, kurtosis, and win-rate from returns or prices.

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": "sharpe_cvar_tearsheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
pricesNoPrice series (alternative to returns)
returnsNoPeriodic return series
riskFreeRateNoAnnual risk-free rate (default 0)
periodsPerYearNoAnnualization periods (default 252)
_paymentSignatureNoOptional base64-encoded x402 v2 payment-signature header (overrides X402_PAYMENT_SIGNATURE env var).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden; it does disclose the meaningful non-obvious traits that this is a paid x402 endpoint costing $0.04 USDC on Base/Solana, and it enumerates the computed outputs. It does not state what happens if both prices and returns are supplied, whether short series are rejected, or whether the call is stateless/read-only, leaving real gaps for an unannotated paid tool.

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?

A single sentence with the pricing/payment-model note front-loaded and the capability statement following immediately after. Every clause (metric list, input alternatives) carries information and there is no filler.

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 stateless five-parameter computation tool with no output schema and no annotations, the enumeration of computed metrics effectively documents the return value, and the payment cost is disclosed. The remaining gap is input-validation behavior and prices-vs-returns precedence, which keeps it from a 5.

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 the baseline is 3; each parameter including defaults and the payment-signature header is already documented in the schema. The description adds only the high-level 'returns or prices' framing and does not clarify precedence, units, or required series length 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?

The description opens with a specific verb ('Computes') and then enumerates the exact metrics produced (Sharpe, Sortino, Calmar, Max Drawdown, VaR/CVaR at 95/99, skewness, kurtosis, win-rate) plus the accepted inputs. An agent knows precisely what this tool returns without opening the schema, and no sibling in the list operates in this domain, so no disambiguation is needed.

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 set ('from returns or prices'), which suggests a portfolio/return-series analysis context, but the description never states when to prefer this over ad-hoc computation or any prerequisite on data length or frequency. There are no exclusions or alternative-selection guidance, though the sibling catalog contains no competing tool.

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