---
summary: "Add offset pagination to pubchem_search_compounds and pubchem_get_compound_interactions, completing #38; switch the interactions SDQ query to a select projection for exact per-kind totals."
breaking: false
security: false
---

# 0.5.2 — 2026-07-28

## Added

- **`pubchem_search_compounds`** — `offset` input (0–10000) pages CIDs past `maxResults`; enrichment gains `offset` (required) and an optional `nextOffset`. Identifier-mode paging re-slices the already-resolved CID set; the bounded formula/substructure/superstructure/similarity searches widen the upstream record window to `offset + maxResults + 1` to reach a page, so deep pages cost progressively more upstream. ([#38](https://github.com/cyanheads/pubchem-mcp-server/issues/38))
- **`pubchem_get_compound_interactions`** — `offset` input (0–2147483646, the upstream `start` cursor's signed-32-bit ceiling) pages each requested kind past `maxEntries`. Output gains a `paging` array (one entry per resolved kind: `kind`, `returnedCount`, `totalRecords`, optional `nextOffset`, `truncated`); enrichment gains `offset` (required) and `nextOffset` (reported only when exactly one requested kind still has records remaining — with more than one, read `paging[].nextOffset` instead). ([#38](https://github.com/cyanheads/pubchem-mcp-server/issues/38))

## Changed

- **`pubchem_search_compounds`** — tool/input descriptions and notices reworded from "raise maxResults" to offset-paging language; an empty page now distinguishes "nothing matched" from "the offset ran past the matches" and names the bound to page back inside.
- **`pubchem_get_compound_interactions`**'s `target` kind switched its SDQ query from a `download` to a `select` projection, returning an exact per-kind `totalRecords` in the same round trip instead of inferring a floor from a saturated window. A side effect: some rows that rendered their activity value in exponential notation under `download` (e.g. `1e-06`) now render as a plain decimal (`0.000001`) — the underlying number is unchanged, with no precision or trailing-zero loss.
- **`pubchem_get_compound_interactions`**'s `fetchSdq` now also treats a `status.error` inside a 2xx SDQ response body as a rejection, alongside the existing non-2xx handling, so a malformed query can't read as an empty page if SDQ ever wraps a rejection in a 200.
- **README** — documents both tools' new `offset` ceilings and the interactions tool's per-kind paging.

Completes [#38](https://github.com/cyanheads/pubchem-mcp-server/issues/38).
