Skip to main content
Glama

Forecast total cost / budget (Monte Carlo)

forecast_cost
Read-onlyIdempotent

Run a Monte Carlo simulation over three-point cost estimates to forecast total budget probabilities (P50–P95) and check the odds of staying under a given budget cap.

Instructions

Run a Monte Carlo simulation over a list of cost line items, each with an optimistic / most-likely / pessimistic amount, to produce a probabilistic forecast of the TOTAL budget. Returns P50/P80/P90/P95, mean, standard deviation, and a distribution shape. Optionally give a budget to get the probability of coming in at or under it. Ideal for building a contingency-aware estimate instead of a single point number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoPRNG seed. Fixed by default so results are reproducible; change it to explore alternate random streams.
unitNoCurrency or unit label, used only for display (e.g. EUR, USD, CHF).EUR
itemsYesCost line items that are summed into a total budget.
budgetNoOptional budget cap (same unit as the estimates). Returns the probability of coming in at or under it.
iterationsNoNumber of Monte Carlo iterations (100..200000).
distributionNoProbability distribution for the estimate. 'pert' (beta-PERT) is the project-management default.pert

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxYes
minYes
meanYes
seedYes
unitYesUnit of the forecast values (e.g. days, EUR).
budgetNo
stdDevYes
histogramYes
iterationsYes
percentilesYesMap of percentile label (e.g. '80') to value.
distributionYes
probabilityWithinBudgetNoProbability (0..1) of coming in at or under `budget`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/closed-world safety, and the description adds real behavioral value: it discloses the percentiles returned, the distribution shape output, and the conditional behavior when `budget` is supplied. It stops short of discussing iteration cost or runtime, but the safety profile is well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: what it does, what it returns, and when to prefer it. Purpose is front-loaded before the outputs and the use-case note.

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?

For a complex simulation tool with one required parameter, a full schema, and an output schema, the description supplies everything an agent needs to decide and invoke correctly; return-value detail is properly left to the output schema.

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, but the description goes beyond it by explaining the semantic intent of the optimistic/most-likely/pessimistic triple (a three-point estimate summed into a total) and the meaning of the optional budget cap. Reproducibility of the seed is left to 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 ('Run a Monte Carlo simulation over a list of cost line items... probabilistic forecast of the TOTAL budget') and enumerates the outputs (P50/P80/P90/P95, mean, stdev, distribution shape). This clearly separates it from the sibling forecast_duration/forecast_completion tools, which forecast other quantities.

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?

Gives a clear use context ('Ideal for building a contingency-aware estimate instead of a single point number') and explains the optional `budget` use case, but never references siblings like pert_estimate or sensitivity_analysis, so no explicit when-not guidance.

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