---
summary: "Fixed census_list_predicate_values listing dataset-dictionary codes a dataset publishes no rows for (#26), and pep/charv returning two indistinguishable rows per geography that both entered comparison rankings (#27)"
breaking: false
security: false
---

# 0.3.1 — 2026-07-31

## Fixed

- **`census_list_predicate_values`** — codes read from a dataset's dictionary value map (`values.item` in `variables.json`) are now checked against the rows the dataset actually publishes before being returned; codes it serves nothing for are dropped. A dictionary map is a classification the Census shares across products, not a record of what one dataset serves: `dec/ddhca` declares 5,543 `POPGROUP` codes and publishes 2,996, `cbp` declares 6,694 `NAICS2017` codes and publishes 2,003, `pep/charv` declares 5,545 `POPGROUP` codes and publishes 12. The check is one wildcard group-by against a measure variable from the dataset's coarsest table (fewest cells = widest published set), cached for the discovery TTL; `source` reports `dataset_dictionary_verified` when the check ran and plain `dataset_dictionary` when it didn't, with the notice saying why — a per-industry dimension is left unscoped-unchecked, and a failed or empty check falls back to the unchecked map rather than emptying the response. A `query` keyword that matches only withheld codes — e.g. "total population" against `dec/ddhca`'s `POPGROUP` — now names the dead code and says it serves nothing, instead of reporting no match at all. `within_naics` also gained a schema `pattern` (2–8 digits, or a hyphenated sector range such as `31-33`), rejecting a malformed industry code instead of silently scoping the enumeration to zero. ([#26](https://github.com/cyanheads/census-mcp-server/issues/26))
- **`census_query_data` / `census_compare_geographies`** — `pep/charv` publishes an April 1 estimates-base record and a July 1 estimate for every geography, distinguished by `MONTH` rather than `YEAR` (which both records carry and defaults to 2020); a query pinning neither returned two indistinguishable rows, and a comparison ranked both as if they were separate geographies. Columns that split a geography into several records are now recognized from `variables.json` — a variable the dataset does not mark `required` that carries its own `_LABEL`/`_DESC` attribute — and requested alongside the query. `census_query_data` now carries a `record` field on each affected row (e.g. `{"MONTH": {"code": "7", "label": "July"}}`), renders it on the row heading, and warns which column to pin. `census_compare_geographies` instead throws a new declared error, `ambiguous_rows` (ValidationError), refusing to rank a dataset that would put one geography on several rows with different values; the recovery hint names the column and the code that selects a record. Passing `predicates: {"MONTH": "7"}` resolves both. ([#27](https://github.com/cyanheads/census-mcp-server/issues/27))

351 tests pass across 11 files; `bun run devcheck` clean.
