> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bedrock.cv/llms.txt
> Use this file to discover all available pages before exploring further.

# Code Compliance

> Check fire rating compliance for doors in rated walls.

## User Prompt

> "Check if doors in 2-hour rated walls on A-101 meet fire code."

## Tool Call Sequence

<Steps>
  <Step title="Get all wall features on the sheet">
    **Call:** `Query`

    ```json theme={null}
    {
      "entity": "feature",
      "project_id": "proj_oak",
      "sheet_number": "A-101",
      "type": "wall"
    }
    ```

    **Response:**

    ```json theme={null}
    {
      "count": 34,
      "items": [
        {
          "id": "ftr_wall_01",
          "type": "wall",
          "label": null,
          "metadata": { "fire_rating": "2-hr", "assembly": "UL U419" },
          "block": { "id": "blk_a101_plan", "type": "Plan", "identifier": "1", "sheet_number": "A-101" },
          "relations": [
            {
              "relation_type": "contains",
              "target": { "entity_type": "feature", "id": "ftr_d104", "type": "door", "label": "104" }
            }
          ]
        },
        {
          "id": "ftr_wall_02",
          "type": "wall",
          "label": null,
          "metadata": { "fire_rating": "2-hr", "assembly": "UL U419" },
          "block": { "id": "blk_a101_plan", "type": "Plan", "identifier": "1", "sheet_number": "A-101" },
          "relations": [
            {
              "relation_type": "contains",
              "target": { "entity_type": "feature", "id": "ftr_d108", "type": "door", "label": "108" }
            },
            {
              "relation_type": "contains",
              "target": { "entity_type": "feature", "id": "ftr_d109", "type": "door", "label": "109" }
            }
          ]
        }
      ]
    }
    ```

    **What the agent learns:** 34 walls total, but only a few have `fire_rating: "2-hr"`. Those walls contain doors 104, 108, and 109 via `contains` relations. The agent needs the door schedule to check their fire ratings.
  </Step>

  <Step title="Fetch the door schedule">
    **Call:** `Query`

    ```json theme={null}
    {
      "entity": "block",
      "project_id": "proj_oak",
      "type": "Schedule",
      "search": "door",
      "include": ["metadata"]
    }
    ```

    **Response:**

    ```json theme={null}
    {
      "count": 1,
      "items": [
        {
          "id": "blk_door_sched",
          "type": "Schedule",
          "name": "DOOR SCHEDULE",
          "sheet": { "id": "sh_a501", "sheet_number": "A-501", "discipline": "A" },
          "metadata": {
            "rows": {
              "104": { "size": "3070", "material": "HM", "fire_rating": "45-min", "hardware_set": "HW-3" },
              "108": { "size": "6070", "material": "HM", "fire_rating": "90-min", "hardware_set": "HW-5" },
              "109": { "size": "3070", "material": "WD", "fire_rating": null, "hardware_set": "HW-1" }
            }
          }
        }
      ]
    }
    ```

    **What the agent learns:** The schedule gives fire ratings for each door. The agent applies the code rule: doors in 2-hour rated walls require a minimum 90-minute fire rating (IBC Table 716.1).
  </Step>
</Steps>

## Agent Response

> I checked **3 doors** in 2-hour rated walls (UL U419 assembly) on sheet A-101. Per IBC Table 716.1, doors in 2-hour fire barriers require a minimum **90-minute** fire rating.
>
> | Door | Wall Rating | Door Rating | Material | Status                                        |
> | ---- | ----------- | ----------- | -------- | --------------------------------------------- |
> | 104  | 2-hr        | 45-min      | HM       | **Non-compliant** -- needs 90-min minimum     |
> | 108  | 2-hr        | 90-min      | HM       | Compliant                                     |
> | 109  | 2-hr        | None        | WD       | **Non-compliant** -- no fire rating specified |
>
> **2 of 3 doors are non-compliant.** Door 104 is underrated (45-min vs 90-min required). Door 109 has no fire rating at all and uses wood -- it likely needs to be upgraded to a rated hollow metal assembly.
>
> Want me to draft an RFI for these issues?

## Summary

| Metric        | Value                                                                                                                                                                                                                                                    |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Tool calls    | **2**                                                                                                                                                                                                                                                    |
| Tools used    | `Query` (feature) then `Query` (block)                                                                                                                                                                                                                   |
| Key technique | Wall features include `contains` relations pointing to door features, so the agent knows which doors to check. The agent applies domain knowledge (IBC fire rating rules) to interpret the data -- this reasoning lives in the agent layer, not the MCP. |
