Skip to main content
Glama
vosesoftware

ModelRisk MCP

Official
by vosesoftware

get_tail_risk

Calculate Value-at-Risk (VaR) and Conditional VaR (CVaR) from simulation outputs, with configurable tail direction and threshold probabilities for risk analysis.

Instructions

ModelRisk: Tail-risk profile of a simulation output from its per-iteration samples — Value-at-Risk (VaR) and Conditional VaR / expected shortfall (CVaR) at each confidence level, plus optional threshold probabilities P(X>t) / P(X<=t). tail='upper' (default) treats large values as the loss (e.g. cost, claims); tail='lower' treats small values as the loss (e.g. NPV, profit). VaR is the alpha-quantile; CVaR is the mean of the worst (1-alpha) tail beyond it. Reads the samples ModelRisk recorded in the .vmrs — run a simulation first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tailNo'upper' (large = bad, default) or 'lower' (small = bad).upper
max_nNoMax samples to read (default 100 000).
alphasNoConfidence levels for VaR/CVaR. Default [0.95, 0.99].
thresholdsNoValues to compute P(X>t) / P(X<=t) for. Optional.
output_nameYesVoseOutput (or VoseInput) name.
workbook_nameNoWorkbook name. Omit for the active workbook.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
meanYes
tailYes'upper' (large = bad) or 'lower' (small = bad).
stdevYes
maximumYes
minimumYes
output_nameYes
sample_sizeYes
tail_metricsYesVaR / CVaR at each requested confidence level.
threshold_probabilitiesNoP(X>t) / P(X<=t) for each requested threshold.
Behavior4/5

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

With no annotations, description covers reading from .vmrs, tail direction interpretation, metric definitions, defaults, and optional thresholds, but lacks details on errors or performance.

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?

Packed with information but efficient; slightly long but every sentence adds value, and core purpose is front-loaded.

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

Completeness5/5

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

With output schema present and full parameter descriptions, the description covers prerequisites, metric definitions, and behavior, making it sufficiently complete for an agent.

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?

Schema coverage is 100% (baseline 3), and description adds context: tail examples (cost vs. NPV), explanation of VaR/CVaR, and default alphas, enhancing understanding beyond 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?

Description clearly states the tool computes tail-risk metrics (VaR, CVaR, threshold probabilities) from simulation output samples, distinguishing from siblings like get_samples or compute_distribution.

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?

Implies usage after running a simulation ('run a simulation first'), but does not explicitly compare to alternatives or state when not to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vosesoftware/modelrisk-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server