---
summary: "Validate CID-shaped structure queries and blank/non-numeric target queries in pubchem_search_compounds and pubchem_search_assays before the upstream call; surface identifier-mode partial-batch misses and CID collisions via a new unresolvedIdentifiers field; add an empty-result notice to pubchem_get_compound_xrefs"
breaking: false
security: false
---

# 0.3.1 — 2026-07-03

## Fixed

- **`pubchem_search_compounds`** — structure/similarity searches with `queryType: "cid"` accepted non-CID-shaped strings and forwarded them to PubChem, producing a raw upstream 400 instead of a typed error. Now validates the query is a positive integer before the call, throwing `invalid_cid_query` with recovery guidance. ([#26](https://github.com/cyanheads/pubchem-mcp-server/issues/26))
- **`pubchem_search_assays`** — a blank or whitespace-only `targetQuery` was treated as a meaningful (empty) search instead of an invalid input. Now rejects blank/whitespace `targetQuery` (`blank_target_query`) and non-numeric `geneid` queries (`invalid_geneid_query`) before the upstream call. ([#26](https://github.com/cyanheads/pubchem-mcp-server/issues/26))
- **`pubchem_search_compounds` identifier mode** — a partial-batch miss (some identifiers resolve, others don't) was silently dropped: `results` held only the hits, with no signal of which inputs failed. Now returns an optional **`unresolvedIdentifiers`** output field plus an enrichment notice naming the misses; an identifier resolving to an already-claimed CID emits a collision notice, and the CID's echoed identifier is now the first requester in input order (previously last-write-wins). ([#29](https://github.com/cyanheads/pubchem-mcp-server/issues/29))
- **`pubchem_get_compound_xrefs`** — returned bare empty arrays for both a nonexistent CID and a real compound with none of the requested xref types, with no way to tell them apart. Now emits an enrichment notice when every requested xref type returns zero IDs, pointing at CID verification. ([#30](https://github.com/cyanheads/pubchem-mcp-server/issues/30))

## Dependencies

- `@biomejs/biome` `^2.5.1 → ^2.5.2`
- `@types/node` `^26.0.1 → ^26.1.0`
