Skip to main content
Glama

Diogenes Context Compression, Code Patching & Deterministic Solver MCP

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

simulate_monte_carlo_risk
Read-onlyIdempotent

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 (70 sats); HTTP 400 if invalid.

Input Schema

TableJSON 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

TableJSON 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. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), yet the description adds substantial operational context beyond them: deterministic/reproducible seeding, a 32 KB payload cap, a 60 RPM rate limit, auth via ?demo=true or L402 (70 sats), and an HTTP 400 failure mode for invalid input.

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?

Purpose and output list are front-loaded, followed by routing guidance, with operational details last. The final sentence is dense, packing rate limit, auth, payment, and error handling into one line, but each clause conveys useful information so little is wasted.

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 not be explained, and the description covers the remaining gaps: reproducibility, limits, payment path, and error condition. For a two-parameter, well-annotated simulation tool, nothing an agent needs to invoke it correctly is missing.

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 both parameters are already documented, making 3 the baseline. The description only restates that variables_json carries 'enum defaults' and adds nothing about distribution_model meaning or format that the schema does not already convey.

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 (runs a simulation) and resource (seeded Mulberry32 Monte Carlo over uncertain cost/latency/duration variables), and names the concrete outputs (P10/P50/P90/P95, VaR, CVaR). It also names the sibling it is not (evaluate_deterministic_math), so an agent can distinguish it without opening schemas.

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?

Explicit when-to-use ('modeling stochastic uncertainty, tail risk, probability of meeting a budget or SLA target') and an explicit exclusion with an alternative ('for evaluating deterministic single-point algebraic formulas or exact NPV/IRR cashflows, use evaluate_deterministic_math instead'). The routing decision is fully specified.

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.

Resources