Skip to main content
Glama

monte_carlo_schedule

Read-onlyIdempotent

Run Monte Carlo simulation on task duration estimates to forecast schedule risk, returning P10–P95 completion estimates and deadline probability.

Instructions

Run Monte Carlo simulation for probabilistic schedule risk analysis.

Samples task durations from triangular distributions and returns P10/P50/P80/P95 completion estimates with identified risk events. Use seed for reproducible results. Supply target_hours (working hours; durations are 8-hour days) to get criticalPathProbability = P(total <= target_hours); without it that field is null.

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": {
      "tasks": "<tasks>"
    },
    "name": "monte_carlo_schedule"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoOptional seed for reproducible results.
tasksYesTask list with PERT-style three-point estimates and dependency edges.
projectNoOptional project/repo identifier this estimate belongs to, for cross-project analytics.
task_typeNoOptional task type for feedback matching. Enables per-task-type accuracy tracking.
iterationsNoNumber of Monte Carlo simulation iterations (1–100,000). Higher = more stable percentiles.
session_idNoOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
task_labelNoOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.
distributionNoWhen true, also return the simulated distribution (20 bin edges and counts in days, plus the P50/P90 bins) so a client can draw the chart.
target_hoursNoOptional deadline in working hours (task durations are in 8-hour days). When supplied, criticalPathProbability reports P(total <= target_hours); when omitted it is null instead of a fabricated value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv0.8.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / distribution
      Added value: +{
      +  "description": "When true, also return the simulated distribution (20 bin edges and counts in days, plus the P50/P90 bins) so a client can draw the chart.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / iterations / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Optional project/repo identifier this estimate belongs to, for cross-project analytics.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / seed / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / seed / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Optional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / target_hours
      Added value: +{
      +  "description": "Optional deadline in working hours (task durations are in 8-hour days). When supplied, criticalPathProbability reports P(total <= target_hours); when omitted it is null instead of a fabricated value.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / task_label
      Added value: +{
      +  "description": "Optional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / properties / tasks / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / tasks / maxItems
      Added value: +500
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/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), so the description correctly spends its words elsewhere: it discloses the returned statistics, that risk events are identified, the reproducibility contract for seed, and — importantly — that criticalPathProbability is null rather than fabricated when target_hours is absent. That null-behavior disclosure is the kind of thing annotations can never convey.

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?

Four sentences, front-loaded with purpose then output shape then the two behavioral caveats that matter (seed, target_hours). Nothing is padding, though the target_hours sentence largely restates the schema's own wording, which is the only mild redundancy.

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?

For a nine-parameter simulation tool with no output schema, the description covers the return values (percentiles, risk events), the conditional field behavior, and reproducibility. Minor gaps remain: it never says what 'identified risk events' contain, and it does not mention that the tasks array is capped at 500 items, though the schema does carry that constraint.

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 every one of the nine parameters is already documented, including target_hours and seed. The description reinforces target_hours by tying it to a specific output field and its null case, which is modest added meaning, but the remaining parameters (iterations, distribution, session_id, task_label, task_type, project) get no treatment beyond what the schema already says. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Run Monte Carlo simulation for probabilistic schedule risk analysis' — and names the sampling model (triangular distributions) plus the outputs (P10/P50/P80/P95 and risk events). An agent knows exactly what it does. It stops short of naming the sibling it should be preferred over (e.g. pert_estimate, critical_path), so it is clear but not sibling-differentiated.

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

Usage Guidelines3/5

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

Guidance is conditional and parameter-oriented rather than tool-selection-oriented: 'Use seed for reproducible results' and 'Supply target_hours ... to get criticalPathProbability; without it that field is null.' That is genuinely useful invocation guidance, but there is no statement of when to choose this over pert_estimate or critical_path for a single-point or deterministic CPM answer.

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