Skip to main content
Glama

monte_carlo_p50_p80

Monte Carlo Schedule Risk Analysis — P10/P50/P80/P90 completion-date forecast for a Primavera P6 schedule.

        Implements an AACE-style quantitative SRA (the same math as
        CPP's browser Tool_11 Portfolio Risk Engine, scripted Python
        counterpart). For each iteration, every activity duration is
        sampled from the chosen distribution (Triangular, BetaPERT,
        Uniform, Lognormal, etc.) parameterized by % of baseline
        duration; CPM re-runs and the project finish date is recorded.
        After all iterations, P10/P50/P80/P90 completion dates and a
        sensitivity tornado (per-activity correlation to project
        finish) are reported.

        Use this tool when you need probabilistic completion forecasts
        or a tornado/sensitivity ranking. For the QRAMM-aligned
        five-level maturity badge (AACE 122R-22) on the result,
        pipe the response into
        ``qramm_maturity``.

        Args:
            xer_path: server-side path to the schedule XER.
            xer_content: full text of the schedule XER (alternative for
                hosted/remote use). Supply EXACTLY ONE of path/content.
            iterations: number of MC iterations (default 5000).
            distribution: 'Triangular', 'BetaPERT', 'Uniform',
                'Lognormal' (case-insensitive — passed through).
            optimistic_pct, most_likely_pct, pessimistic_pct: %
                of baseline duration for the distribution params
                (defaults: 85 / 100 / 120).
            seed: optional fixed seed for reproducibility (0 = system
                entropy = non-reproducible).
            output_dir: optional output dir; tempdir if "".
            company: optional, the firm the dashboard carries (title
                block, print cover). Blank unless supplied, and blank
                carries no firm: a hosted run is the caller's document.

        Returns:
            Full SRA result dict, key paths:
              - 'baseline.percentiles': lowercase p-keys
                {'p10','p25','p50','p75','p80','p85','p90','p95'},
                each {'day', 'date'}. NOTE: keys are lowercase — read
                result['baseline']['percentiles']['p80'], not 'P80'.
              - 'baseline.config':      sim params used
              - 'baseline.sensitivity': per-activity tornado rows
              - 'risk_register_simulation.percentiles' (only when a
                risk_register is supplied): SAME lowercase convention,
                {'p10','p50','p80','p90'} each {'day', 'date'}.
              - 'project_name', 'data_date', ...
              - HTML / DOCX paths if outputs emitted
        

Input Schema

NameRequiredDescriptionDefault
seedNo
companyNo
xer_pathNo
iterationsNo
output_dirNo
xer_contentNo
distributionNoTriangular
optimistic_pctNo
most_likely_pctNo
pessimistic_pctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / company
      Added value: +{
      +  "default": "",
      +  "title": "Company",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does a fair amount: it explains the simulation mechanics, that seed=0 means system entropy and non-reproducible runs, that output_dir falls back to a tempdir, and that blank company carries no firm name in hosted runs. It omits operational traits an agent would want — expected runtime for 5000 iterations, whether the XER is read from server filesystem with what permissions, and whether HTML/DOCX emission is optional or automatic.

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, usage routing, parameters, and return shape are front-loaded and cleanly sectioned, with the critical lowercase-key caveat called out in caps. The aside about being the Python counterpart of CPP's Tool_11 is slightly self-referential padding, and the Args block restates defaults already visible in the schema, but the structure still serves the reader.

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 ten-parameter tool with no output schema and no annotations, the description fills both gaps: it documents every parameter and maps the exact return dict key paths, including the lowercase percentile convention and the conditional risk_register_simulation branch. An agent can construct a call and parse the response without opening anything else.

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 description coverage is 0%, so the docstring's Args block is the only parameter documentation and it covers all ten: the xer_path/xer_content mutual exclusivity ("Supply EXACTLY ONE"), the accepted distribution names and case-insensitivity, the percentage-of-baseline meaning of optimistic/most_likely/pessimistic with their defaults, and the seed semantics. It stops short of stating valid ranges (e.g. whether pessimistic_pct must exceed optimistic_pct) or what happens if both path and content are supplied.

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?

The opening states a specific verb and resource — Monte Carlo schedule risk analysis producing P10/P50/P80/P90 completion-date forecasts for a Primavera P6 schedule — and the algorithm used (duration sampling plus CPM re-runs) is spelled out. It is clearly separable from siblings like dcma14_health_check or slip_velocity because the probabilistic forecast and tornado output are named.

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?

It gives an explicit trigger ("Use this tool when you need probabilistic completion forecasts or a tornado/sensitivity ranking") and routes the agent to the correct follow-up tool (qramm_maturity) for the AACE 122R-22 maturity badge. It also implicitly excludes the deterministic siblings by framing this as the probabilistic path.

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.