Skip to main content
Glama

epa-drinking-water-quality-screener

Screen US coordinates or public water system IDs to find the serving system and retrieve SDWA violations, lead 90th-percentile results, and PFAS detections.

Instructions

EPA Drinking Water Quality Screener - Violations, Lead & PFAS. Screen any US coordinate for the public water system serving it: SDWA health-based violations, Lead & Copper Rule 90th-percentile results and UCMR5 PFAS detections - the evidence base behind the LCRI (Nov 1, 2027) and PFAS NPDWR (Apr 26, 2027) deadlines. Never clears a source that did not answer. CHOOSE THIS for public water-system quality: SDWA violations, lead 90th-percentile results and PFAS occurrence. It is NOT a property contamination screen — for soil and groundwater records at a site use epa-contaminated-site-screener. INPUTS: supply assets (lat/lon, matched to a water system boundary) or pwsids (9-character EPA system ids) or both. includePfas is the slow leg; turn it off when PFAS is not the question. violationYears only changes the recent-violation flags, not the history summary. maxAssets is the cost cap. Reads live from the official government source. Call describe-gov-data-tool (free) for a verified example input. COST AND SIDE EFFECTS: read-only with respect to the government source — it never writes to any external system — but each call starts a metered run on YOUR Apify account, billed $0.012 per Drinking water screening result ($12 per 1,000). Lower on paid Apify plans, down to $3.60 per 1,000. Nothing is charged when a run fails. Store page: https://apify.com/malonestar/epa-drinking-water-quality-screener

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "epa-drinking-water-quality-screener"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetsNoSites to screen, each {"lat": <number>, "lon": <number>, "label": "<your name for the site>"}. Each location is matched against EPA's mapped community water system service areas to identify the serving public water system. A location with no mapped service area returns an explicit NO_SERVICE_AREA row (likely a private well), never a false clear. Example: [{"lat":43.0125,"lon":-83.6875,"label":"Flint MI - lead action level exceedance"},{"lat":40.9793,"lon":-74.1165,"label":"Ridgewood NJ - PFAS detections"},{"lat":39.7392,"lon":-104.9903,"label":"Denver CO - control"}].
pwsidsNoOptional. Screen specific public water systems by 9-character EPA PWSID (for example ["MI0002310"]) without a coordinate lookup. Combined with any locations supplied above. Example: [].
maxAssetsNoSafety cap on how many locations are screened in one run. Locations beyond the cap are reported in the log and not billed. Example: 250.
includeLeadNoFetch Lead and Copper Rule 90th-percentile tap results and join them to their monitoring periods, so the reported value is dated rather than undated. Example: true.
includePfasNoScreen the system against EPA's UCMR5 occurrence dataset (1.9 million results, 29 PFAS analytes plus lithium). Turn off for a faster run when PFAS is out of scope. Example: true.
simulateOutageNoDiagnostic seam for verifying failure behaviour. Forces one or all EPA sources to fail so you can confirm the actor reports the source as unavailable and never publishes a false clear. Leave as none for normal use. Example: "none".
violationYearsNoHow many years back counts as a recent health-based violation for the screening flags. The full violation history is still summarised regardless. Set 0 to disable the window. Example: 10.
refreshPfasCacheNoRe-download and re-index the UCMR5 occurrence file even if the cached index already matches EPA's current published vintage. Normally unnecessary: the cache is keyed to the file's Last-Modified header and rebuilds itself whenever EPA republishes. Example: false.
runBudgetSecondsNoTotal time budget for all upstream requests including retries. Requests stop rather than retry past this budget, so a long EPA outage fails loudly instead of hanging. Prefilled at 240 s so a demo or QA run finishes inside Apify's 5-minute limit even when EPA is slow; when omitted the run allows 900 s. Example: 240.
includeViolationsNoFetch the system's full Safe Drinking Water Act violation history from EPA SDWIS and roll it up (health-based, monitoring/reporting, treatment technique, Lead & Copper Rule, public-notification tier). Example: true.
includeEnforcementNoFetch the system's SDWIS formal enforcement action history and report the count and most recent action. Example: true.
maxViolationDetailsNoHow many individual health-based violation records to include in the health_based_violation_details array on each row, newest first. Counts are never truncated. Example: 25.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.7
    • changedInput schema / properties / runBudgetSeconds / description
      Previous value: -"Total time budget for all upstream requests including retries. Requests stop rather than retry past this budget, so a long EPA outage fails loudly instead of hanging. Example: 900."New value: +"Total time budget for all upstream requests including retries. Requests stop rather than retry past this budget, so a long EPA outage fails loudly instead of hanging. Prefilled at 240 s so a demo or QA run finishes inside Apify's 5-minute limit even when EPA is slow; when omitted the run allows 900 s. Example: 240."
  2. First observedv1.0.2

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses metered pricing ($0.012/result, $12 per 1,000, lower on paid plans), that failed runs are free, that it never writes to any external system despite readOnlyHint=false (the write-like side effect is billing on the caller's Apify account), and the failure contract "never clears a source that did not answer." That reconciles the annotations rather than contradicting them.

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?

Front-loaded with purpose, then routing, then inputs, then cost and side effects — a sensible order for an agent scanning top-down. It is dense but every block carries information; the main waste is the marketing-style title restatement and the dated-deadline framing, which is color rather than invocation guidance.

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 12-parameter, no-output-schema tool it covers cost, failure behavior, no-service-area handling, and the explicit NO_SERVICE_AREA row, which is the main return-shape fact an agent needs. Return payload structure is only partially described, but the pointer to describe-gov-data-tool mitigates that.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns a bump by adding cross-parameter semantics the schema does not spell out — that includePfas is "the slow leg," that violationYears affects only recent-violation flags and not the history summary, and that maxAssets is the cost cap. Slightly redundant with schema prose in places, but the cost/performance relationships are genuinely additive.

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?

"Screen any US coordinate for the public water system serving it: SDWA health-based violations, Lead & Copper Rule 90th-percentile results and UCMR5 PFAS detections" names a specific verb, a resource, and the exact data families returned. It also positively rules out the nearest sibling: "It is NOT a property contamination screen ... use epa-contaminated-site-screener." An agent can route between the two EPA tools without opening either schema.

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?

Explicit when-to-use ("CHOOSE THIS for public water-system quality"), explicit when-not with a named alternative, plus per-parameter usage advice ("turn includePfas off when PFAS is not the question"). It also points to describe-gov-data-tool for a verified example input, which is a real routing hint rather than filler.

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