Skip to main content
Glama

collapsed_as_built

Collapsed As-Built / But-For analysis on a post-impact XER.

        Implements AACE RP 29R-03 §3.8 Modeled / Subtractive / Single
        Base method (paired with MIP 3.3 Windows for the dual-method
        gap report per SCL §11.5). Validates a forensic windows
        analysis (MIP 3.3) by independently computing the same
        project drift via subtractive removal of delays from the
        as-built schedule.

        For each delay event, the as-built duration of every
        ``affected_activity`` is shortened by ``impact_days`` working
        days on that activity's calendar (or removed entirely if
        ``removal_method="remove"``), then CPM re-runs and the
        resulting "but-for" finish date is compared to the as-built
        finish. Cumulative pass removes ALL events at once for a
        project-level but-for finish. Every finish shift is stated in
        working days on ``workday_calendar``; the calendar-day span of
        the same shift is kept beside it, and ``day_unit_basis`` names
        the unit of every bare ``*_days`` key in the result.

        Use this tool when opposing counsel demands a but-for analysis
        or you need a dual-method validation pairing §3.3 (windows) with
        §3.8 (collapsed-as-built). For prospective fragnet insertion
        (MIP 3.7), use ``time_impact_analysis_fragnet`` instead.

        Args:
            as_built_xer_path:    server-side post-impact XER (after delays incurred).
            as_built_xer_content: full text of post-impact XER (alternative for hosted/remote use).
                                  Supply EXACTLY ONE of path/content.
            delay_events: list of event dicts. Each must have
                ``event_id``, ``affected_activities`` (list of
                task_codes), and ``impact_days`` (number of working
                days on the affected activity's calendar). Optional:
                ``removal_method`` ('shorten'|'remove'),
                ``responsible_party``, ``name``, ``description``.
            output_dir: optional output dir for HTML/CSV (tempdir if "").
            project_name: optional override.
            removal_method: global default 'shorten' or 'remove'.
            contractor_filter: when True, exclude contractor-caused
                events from the cumulative pass (owner audit mode).

        Returns:
            {
              "as_built_finish": "YYYY-MM-DD",
              "per_event_results": [{event_id, but_for_finish,
                                      impact_workdays_collapsed,
                                      collapse_state,
                                      duration_removal_basis,
                                      finish_driver_after_removal, ...}, ...],
              # impact_workdays_collapsed is the event's finish shift in
              # working days on workday_calendar. Each event also carries
              # impact_days_collapsed: the same shift in calendar days.
              # duration_removal_basis discloses WHAT duration was removed
              # and on what basis; finish_driver_after_removal discloses
              # WHAT drives the but-for finish (incl. whether it is bound by
              # the data-date floor) so a reader sees WHY the finish did or
              # did not move across data dates.
              "cumulative_but_for_finish": "YYYY-MM-DD",
              "cumulative_impact_workdays": int,  # working days on workday_calendar
              "cumulative_impact_days": int,  # the same shift in calendar days
              "cumulative_collapse_state": str,  # a 'locked_by_actuals' zero is not "no impact"
              "workday_calendar": str,  # the calendar every working-day figure is stated on
              "day_unit_basis": dict,  # each bare *_days key: 'working_days' or 'calendar_days'
              "dual_method_gap": dict | None,  # working days only
              "output_files": {...},
              "warnings": [...],
              "method": "AACE 29R-03 §3.8 (Modeled/Subtractive/Single Simulation)"
            }
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_dirNo
delay_eventsNo
project_nameNo
removal_methodNoshorten
as_built_xer_pathNo
contractor_filterNo
as_built_xer_contentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly: it explains the subtractive algorithm, the CPM re-run, cumulative vs per-event passes, working-day vs calendar-day unit disclosure, warnings, output files, and subtle state semantics like 'locked_by_actuals' meaning a zero is not necessarily 'no impact'. This is far beyond typical transparency.

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 description is long but well front-loaded: purpose, method, when-to-use, then args and returns. The length is justified by the tool's complexity and the absence of schema descriptions and an output schema, though a few repeated unit explanations could be tightened without losing meaning.

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?

Given 0% schema coverage, no annotations, and no output schema, the description is complete. It documents all input parameters, the full return value shape, behavioral nuances, and the alternative tool, leaving no critical gap for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does so completely. Every one of the 7 parameters is explained in an Args section, including the exact structure needed for delay_events, the exclusivity of as_built_xer_path vs as_built_xer_content, and the meaning of contractor_filter.

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 forensic analysis (Collapsed As-Built / But-For) on a post-impact XER and names the exact method standard (AACE RP 29R-03 §3.8). It distinguishes itself from the sibling time_impact_analysis_fragnet and from the windows analysis it validates, so an agent can select it without ambiguity.

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?

Explicitly says when to use it ('when opposing counsel demands a but-for analysis or you need a dual-method validation pairing §3.3 with §3.8') and names the alternative for a different scenario (time_impact_analysis_fragnet for prospective fragnet insertion). No inference required.

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.