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

# Waste Water Treatment Tools

> MCP tools for querying waste water treatment records — treatment types, flow volumes, and emissions

# Waste Water Treatment Tools

Query waste water treatment (WWT) records — treatment types, discharge parameters, flow volumes, and associated CO2e emissions. Covers Scope 1 emissions from wastewater processing.

<Note>
  Waste water treatment tools require a **facility\_id**. Call `list_facilities` first to get one. Records are scoped to a single facility.
</Note>

## `list_waste_water_treatments`

List waste water treatment records for a facility with enriched data (co2e, user, linked projects). Paginated.

**Parameters:**

| Parameter         | Type      | Required | Default     | Description                                          |
| ----------------- | --------- | -------- | ----------- | ---------------------------------------------------- |
| `facility_id`     | string    | **Yes**  | —           | Facility UUID. Call `list_facilities` first          |
| `start_date`      | string    | No       | —           | Filter from date (YYYY-MM-DD)                        |
| `end_date`        | string    | No       | —           | Filter to date (YYYY-MM-DD)                          |
| `status`          | string\[] | No       | —           | Filter by record status (e.g. `["active"]`)          |
| `co2e_status`     | string    | No       | —           | Filter: `calculated` or `not_calculated`             |
| `project_id`      | string    | No       | —           | Filter by project UUID                               |
| `sort`            | string    | No       | —           | Sort field, prefix `-` for desc (e.g. `-start_date`) |
| `page`            | integer   | No       | 1           | Page number                                          |
| `size`            | integer   | No       | 50          | Items per page (max 200)                             |
| `organization_id` | string    | No       | default org | Organization UUID                                    |

**Example response:**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "items": [
    {
      "id": "wwt-uuid-...",
      "facility_id": "fac-uuid-...",
      "treatment_type": "aerobic",
      "start_date": "2025-01-01",
      "end_date": "2025-03-31",
      "flow_volume_m3": 12500.0,
      "population_equivalent": 5000,
      "co2e": 3.45,
      "co2e_status": "calculated",
      "status": "active",
      "created_by": {"id": "user-uuid", "name": "Ana Garcia"}
    }
  ],
  "total": 8,
  "page": 1,
  "size": 50
}
```

**Key response fields:**

| Field                   | Description                                                              |
| ----------------------- | ------------------------------------------------------------------------ |
| `treatment_type`        | Type of wastewater treatment (e.g. `aerobic`, `anaerobic`, `lagoon`)     |
| `flow_volume_m3`        | Volume of wastewater treated in cubic meters                             |
| `population_equivalent` | Population equivalent served by the treatment plant                      |
| `co2e`                  | Calculated CO2-equivalent emissions in tonnes                            |
| `co2e_status`           | Whether emissions have been calculated: `calculated` or `not_calculated` |

**Example prompts:**

```
"Show waste water treatments for facility X in Q1 2025"
"Which WWT records don't have calculated emissions yet?"
"List waste water treatments sorted by most recent first"
```

***

## `get_waste_water_treatment`

Get full detail for a waste water treatment record — treatment type, flow volumes, discharge parameters, co2e breakdown, user info, and linked projects.

**Parameters:**

| Parameter         | Type   | Required | Default     | Description       |
| ----------------- | ------ | -------- | ----------- | ----------------- |
| `wwt_id`          | string | **Yes**  | —           | WWT record UUID   |
| `organization_id` | string | No       | default org | Organization UUID |

**Example response:**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "wwt-uuid-...",
  "facility_id": "fac-uuid-...",
  "treatment_type": "aerobic",
  "start_date": "2025-01-01",
  "end_date": "2025-03-31",
  "flow_volume_m3": 12500.0,
  "population_equivalent": 5000,
  "discharge_bod": 25.0,
  "discharge_cod": 120.0,
  "sludge_quantity_tonnes": 8.5,
  "co2e": 3.45,
  "co2e_breakdown": {
    "discharge": 1.2,
    "sludge": 0.8,
    "population": 0.95,
    "water": 0.5
  },
  "created_by": {"id": "user-uuid", "name": "Ana Garcia"},
  "linked_projects": [{"id": "proj-uuid", "name": "ISO 14064 2025"}]
}
```

**Key response fields:**

| Field                    | Description                                                            |
| ------------------------ | ---------------------------------------------------------------------- |
| `discharge_bod`          | Biochemical oxygen demand of discharge (mg/L)                          |
| `discharge_cod`          | Chemical oxygen demand of discharge (mg/L)                             |
| `sludge_quantity_tonnes` | Quantity of sludge produced in tonnes                                  |
| `co2e_breakdown`         | Emissions split by sub-category (discharge, sludge, population, water) |
| `linked_projects`        | Projects this record is associated with                                |

**Example prompts:**

```
"Show the details for this waste water treatment record"
"What's the emissions breakdown for this WWT record?"
"Which projects is this waste water treatment linked to?"
```

***

## Workflow

A typical workflow for analyzing waste water treatment data:

1. **`list_facilities`** — find the facility with wastewater operations
2. **`list_waste_water_treatments`** — list WWT records for that facility, filtering by date or status
3. **`get_waste_water_treatment`** — inspect a specific record's co2e breakdown
4. **`get_greenhouse_gas_emissions`** with `category="waste_water_treatment_*"` — see validated emissions across all WWT sub-categories

<Note>
  Waste water treatment emissions are split into four GHG categories: `waste_water_treatment_discharge`, `waste_water_treatment_population`, `waste_water_treatment_sludge`, and `waste_water_treatment_water`. Use `get_greenhouse_gas_emissions` with a specific category to query validated totals.
</Note>

## Related

<CardGroup cols={2}>
  <Card title="Emissions Tools" icon="smog" href="/mcp/emissions">
    Query validated GHG emissions across all categories
  </Card>

  <Card title="Facilities Tools" icon="location-dot" href="/mcp/facilities">
    List and manage facilities
  </Card>
</CardGroup>
