Skip to main content
Glama

Summarize best/median/worst scenarios

scenario_analysis

Runs a simulation once and summarises a target node's worst/median/best outcomes (any percentiles), each paired with a best-effort driving input per root node. Use this when you need a quick worst-case/median/best-case narrative for a plan rather than the full distribution. Debits one credit for authenticated callers. Example: {"graph":{"root_nodes":[{"id":"root","distribution_type":"normal","distribution_params":{"mean":100,"std":15}}],"calc_nodes":[{"id":"out","formula":"{e1}"}],"edges":[{"id":"e1","source":"root","target":"out"}],"run_params":{"trials":1000,"time_periods":12}}}

Input Schema

NameRequiredDescriptionDefault
seedNoOptional RNG seed for a reproducible run.
graphYesThe full simulation graph (same shape as run_simulation).
api_keyNoYour API key from POST /api/v1/accounts. Debits credits per analysis (priced like one run). Omit to run anonymously (free).
percentilesNoScenario percentiles in [0,1]. Default [0.0, 0.5, 1.0] = worst / median / best.
time_periodNo0-based time period to analyse. Defaults to the last period (time_periods - 1).
target_node_idNoThe output node to summarise. Defaults to the graph's last calc node (the usual goal node).

Output Schema

NameRequiredDescriptionDefault
trialsYes
scenariosNo
time_periodYes
runs_executedYesSimulation runs the analysis cost (always 1 — one run reused).
target_node_idYes
credits_debitedNoCredits charged to the account (0 for anonymous).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the description usefully adds that the call 'Debits one credit for authenticated callers' and that it performs exactly one simulation run (not a distribution sweep). It also discloses an output trait beyond the schema ('each paired with a best-effort driving input per root node'), notably that the driver attribution is heuristic. It stops short of stating what happens when credits are exhausted or how failures are surfaced.

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 core statement and the usage condition are front-loaded in the first two sentences, and the credit cost is placed before the example where it is visible. The trailing JSON example is long but pays for itself as a construction template; a slightly tighter opening sentence would be ideal.

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?

An output schema exists, so return values need not be explained, and the nested graph schema is richly documented on its own. The description covers purpose, selection condition, cost and a concrete input example, leaving only edge cases (anonymous/free path, credit exhaustion, failure modes) unaddressed.

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%, so the baseline is 3; the description earns above that by supplying a complete worked graph example showing root_nodes, calc_nodes, edges and run_params together, which materially helps construct the one required parameter. It also reiterates the percentile semantics (worst/median/best) in plain terms, though it adds nothing about seed or time_period 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?

States a specific verb and resource ('Runs a simulation once and summarises a target node's worst/median/best outcomes'), including that arbitrary percentiles are supported. It also implicitly distinguishes itself from the full-distribution sibling by contrasting 'a quick worst-case/median/best-case narrative' with 'the full distribution', so an agent can route between this and run_simulation without opening either schema.

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?

Explicitly gives the selecting condition: 'Use this when you need a quick worst-case/median/best-case narrative for a plan rather than the full distribution.' That is a clear when-to-use with an implied alternative, but it never names run_simulation or get_results, so the agent must infer the sibling by name rather than being routed to it.

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