Skip to main content
Glama
WillHsiaoNYC

NYC Open Data Capital Projects MCP Server

by WillHsiaoNYC

delay_reason_stats

Read-onlyIdempotent

Get delay reason distribution for NYC capital projects, including counts of delayed items with and without reasons. Filter by current/lifetime scope and agency role.

Instructions

Distribution of reason-for-delay (only populated when variance>0). Defaults to current period; pass scope='all_history' for lifetime. Carries a coverage block (delayed_total / with_reason / without_reason — the denominator for the distribution, counting delayed rows by bare variance_day>0). agency_role ('auto'|'sponsor'|'managing') picks owner vs builder lens.

Interpretation rules:

  • [period_basis] Reporting-period basis: state the returned period for every count, total or ranking and both periods for comparisons. Period aggregates default to the latest complete snapshot, which may precede a partially published newer period. fms_location, fms_sponsor and lifetime_budget_variance are all-history dimensions without reporting_period: use them for enrichment or lifetime figures, never as a single period's inventory.

  • [agency_roles] Agency attribution is role-aware: an agency's projects mean its sponsor (owner) view, except DDC/DCAS/EDC default to managing (builder). State the returned agency_scope. managing_agency is the executor on schedules and the budget-holder on budgets; a budget-only holder is not a schedule executor. list_agencies exposes is_schedule_executor. For sponsor-scoped budget totals, use a semi-join to fms_sponsor; a value-bearing join can multiply lines. Co-owner totals can overlap and must not be added together.

  • [schedule_coverage] Schedule totals and cumulative variance use dashboard-aligned schedule_history. source_schedule_history retains native observations absent from that population; schedule_source_coverage reconciles them. State the schedule universe and cumulative basis. Parenthesized phases are no-schedule reasons. Respect excluded variance artifacts and missing/invalid-duration counts; forward duration statistics exclude reversed dates.

  • [signed_values] Report neutral, SIGNED changes: "moved 45 days later" or "budget decreased $2M". Do not echo loaded terms in the answer. "slippage" means positive schedule change and "overrun" means positive budget growth; neither includes the decreasing side. Preserve the returned direction and metric basis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNocurrent
agencyNo
periodNocurrent
agency_roleNoauto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonsYes
coverageYes
provenanceYes
interpretation_rulesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • addedInput schema / properties / agency_role / enum
      Added value: +[
      +  "auto",
      +  "sponsor",
      +  "managing"
      +]
    • addedInput schema / properties / scope / enum
      Added value: +[
      +  "current",
      +  "all_history"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "InterpretationRule": {
      +      "properties": {
      +        "id": {
      +          "description": "Stable identifier of the domain rule.",
      +          "title": "Id",
      +          "type": "string"
      +        },
      +        "text": {
      +          "description": "Guidance for interpreting and reporting this tool's result.",
      +          "title": "Text",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "text"
      +      ],
      +      "title": "InterpretationRule",
      +      "type": "object"
      +    }
      +  },
      +  "additionalProperties": true,
      +  "properties": {
      +    "coverage": {
      +      "additionalProperties": true,
      +      "title": "Coverage",
      +      "type": "object"
      +    },
      +    "interpretation_rules": {
      +      "items": {
      +        "$ref": "#/$defs/InterpretationRule"
      +      },
      +      "title": "Interpretation Rules",
      +      "type": "array"
      +    },
      +    "provenance": {
      +      "additionalProperties": true,
      +      "title": "Provenance",
      +      "type": "object"
      +    },
      +    "reasons": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Reasons",
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "provenance",
      +    "interpretation_rules",
      +    "reasons",
      +    "coverage"
      +  ],
      +  "title": "ReasonsResult",
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world, so safety is covered. The description adds genuine behavioral detail beyond them: the coverage block contents with denominators, the variance_day>0 population rule, and the agency_role lens. It stops short of disclosing edge behavior like empty distributions or default period resolution timing, but adds meaningful context.

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

Conciseness2/5

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

The tool's own description is front-loaded well, but the appended 'Interpretation rules' block is a large generic preamble covering reporting periods, agency roles, schedule coverage, and signed values that applies broadly across the toolkit rather than this tool. It buries the specific tool semantics and hurts scannability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

It provides the coverage block and enum behavior, and an output schema exists so return shape need not be explained. Yet for a tool whose core is a distribution, it omits what the aggregation is keyed on and leaves the 'period' and 'agency' parameters unexplained, so an agent still has gaps before calling correctly.

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 0% across 4 parameters, so the description must carry the burden; it explains scope ('all_history' for lifetime, default current) and agency_role enum behavior ('auto'|'sponsor'|'managing' picks owner vs builder). It says nothing about the 'period' or 'agency' parameters, so half the params remain undocumented.

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 resource (distribution of reason-for-delay) and scope behavior. It establishes what is being counted, but without a title and amid many aggregate stats siblings, differentiation from tools like schedule_breakdown or budget_breakdown relies on inference. Purpose is clear but sibling differentiation is thin.

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?

It states a usage condition ('only populated when variance>0') and the scope switch for all_history, which is real guidance. However, it never names when to prefer an alternative (e.g. schedule_changes) or when this distribution is not the right lens, leaving the routing to inference.

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