Skip to main content
Glama
John-Amal

Tail-Risk-Toolkit

by John-Amal

tailrisk_var_es

Read-onlyIdempotent

Estimate Value-at-Risk and Expected Shortfall using EVT, historical, and Gaussian methods to compare tail risk estimates and quantify the need for a tail model.

Instructions

Estimate VaR and Expected Shortfall by three methods for comparison.

The EVT estimate extrapolates beyond the observed sample, the historical estimate cannot, and the Gaussian estimate is a deliberately naive baseline. A large gap between the EVT and Gaussian figures is the quantitative case for using a tail model at all.

Returns: str: JSON with an evt object (var, es, shape, threshold), historical and gaussian objects, plus evt_vs_gaussian_ratio and the confidence level. Individual methods report a note instead of a number when undefined.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already mark the tool as readOnly and destructiveHint=false; the description adds valuable behavioral context by explaining that EVT extrapolates beyond observed data, historical cannot, and Gaussian is deliberately naive. It also discloses that individual methods report a 'note' instead of a number when undefined, which is useful runtime behavior.

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?

The description is front-loaded with the core purpose and uses a structured Returns section. The middle paragraph about EVT vs Gaussian is somewhat conceptual but earns its place by explaining why the comparison matters, so the overall length is appropriate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only estimation tool with annotations and a detailed nested schema, the description is reasonably complete. However, the lack of usage guidance and parameter-semantics compensation leaves an agent without clear direction on when to call this tool versus siblings or how to set lower-tail conventions beyond what the schema already provides.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is reported as 0%, so the description must compensate for parameter meaning, but it adds almost no input parameter guidance. It mentions 'threshold' and 'confidence' in the return shape, but does not explain how to set tail, threshold, threshold_quantile, or confidence for the call.

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 and resource: 'Estimate VaR and Expected Shortfall by three methods for comparison.' It clearly distinguishes this tool from siblings like tailrisk_fit_gpd or tailrisk_backtest_var by focusing on joint VaR/ES estimation with a three-method comparison.

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

Usage Guidelines2/5

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

The description explains what the methods do conceptually but provides no explicit guidance on when to choose this tool over siblings. It does not mention alternatives, exclusions, or conditions such as 'use this when comparing tail models' or 'for backtesting use tailrisk_backtest_var.'

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