Get ZIP-level violation benchmark
get_zip_peer_statsReturn the open-HPD-violation benchmark for a NYC ZIP code, from a weekly snapshot of HPD data: how many buildings have at least one open HPD violation, and the mean, median, 90th-percentile and maximum open HPD violations among those buildings (buildings with none are not in the denominator), plus lastRefreshed and stale. Pass openViolations to also get a verdict comparing one building's open HPD count to the ZIP mean: ratio to the mean, a label (well_below … much_above), and a plain-English sentence. The verdict is a comparison to the mean only, not a percentile rank. openViolations must be summary.hpdOpenViolations from check_building_compliance; if that is null (incomplete or unknown), omit openViolations. Do not pass the all-agency openViolations total. Returns not_found for ZIPs with no snapshot yet.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"zip": "<zip>"
},
"name": "get_zip_peer_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zip | Yes | NYC 5-digit ZIP code, e.g. "11201". | |
| openViolations | No | The building's exact count of open HPD violations: summary.hpdOpenViolations from check_building_compliance. Omit it when that value is null. Enables the comparison verdict. |