Skip to main content
Glama

Seeded Mulberry32 Monte Carlo Percentile, VaR & Tail-Risk Simulator

simulate_monte_carlo_risk
Read-onlyIdempotent

Simulates uncertain cost, latency, or duration variables to compute P10–P95 percentiles, VaR, and CVaR, helping assess tail risk and the probability of meeting budget or SLA targets.

Instructions

Runs a reproducible seeded Mulberry32 Monte Carlo simulation over uncertain cost, latency, or duration variables to compute P10/P50/P90/P95 percentiles, Value-at-Risk (VaR), and CVaR. Use when modeling stochastic uncertainty, tail risk (VaR/CVaR), and probability of meeting a budget or SLA target; for evaluating deterministic single-point algebraic formulas or exact NPV/IRR cashflows, use evaluate_deterministic_math instead. Read-only edge call (32 KB, 60 RPM): accepts 'variables_json' (with enum defaults), uses '?demo=true' or L402 (20 sats); HTTP 400 if invalid.

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": {
      "variables_json": "<variables_json>"
    },
    "name": "simulate_monte_carlo_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
variables_jsonYesJSON array of stochastic variables (e.g. name, min, mode, max) to simulate.
distribution_modelNoProbability distribution family applied to each variable; defaults to 'triangular_pert' when omitted.

Output Schema

NameRequiredDescriptionDefault
percentilesYesComputed p10, p50_median, p90, p95, and p99 outcome distribution percentiles.
trials_executedYesNumber of seeded Monte Carlo trials executed.
value_at_risk_95Yes95% Value-at-Risk (VaR_95) threshold.
conditional_tail_expectation_95Yes95% Conditional Tail Expectation (CVaR_95 / Expected Shortfall) across the worst 5% of trials.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.3

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description goes well beyond them: deterministic seeding for reproducibility, a 32 KB payload cap, 60 RPM rate limit, '?demo=true' or L402 payment at 20 sats, and HTTP 400 on invalid input. These are non-obvious operational constraints an agent must know before calling.

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 purpose, then selection guidance, then operational constraints in a compact second sentence. The final clause is densely packed (limits, payment, error code in one line) but every element earns its place; no filler.

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 an output schema present, return values need no explanation, and the description still covers inputs, defaults, size/rate limits, access modes, and failure behavior. An agent has everything needed to decide and invoke correctly.

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% and both parameters carry descriptive text plus an enum for distribution_model, so the baseline is 3. The description adds only marginal value ("accepts 'variables_json' (with enum defaults)") without specifying the JSON element shape or how distribution_model interacts with per-variable definitions.

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?

States a specific verb and resource ("Runs a reproducible seeded Mulberry32 Monte Carlo simulation over uncertain cost, latency, or duration variables") and enumerates the exact outputs (P10/P50/P90/P95, VaR, CVaR). It is clearly separable from the closest sibling, evaluate_deterministic_math, which it explicitly names.

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

Usage Guidelines5/5

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

Gives an explicit use condition ("Use when modeling stochastic uncertainty, tail risk (VaR/CVaR), and probability of meeting a budget or SLA target") and an explicit exclusion with the correct alternative ("for evaluating deterministic single-point algebraic formulas or exact NPV/IRR cashflows, use evaluate_deterministic_math instead"). Nothing about tool selection is left to inference.

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

Deploy Server

Other Tools