---
summary: "Add maxAtoms/maxBonds/includeRawSdf output controls with truncation disclosure to pubchem_get_compound_3d_structure; frame upstream free text (descriptions, synonyms, interaction statements, GHS text, raw SDF) as delimited data in content[] to neutralize markdown-structure injection across six tools"
breaking: false
security: false
---

# 0.4.0 — 2026-07-03

## Added

- **`pubchem_get_compound_3d_structure`** — optional `maxAtoms`/`maxBonds` cap the atom/bond preview (default 200 each); `includeRawSdf` opts into the full raw SDF past a 500-line safe default. `atomCount`/`bondCount` always report the full totals; capping surfaces via a new `truncated`/`shownAtoms`/`shownBonds`/`atomCap`/`bondCap`/`shownSdfLines` enrichment block with a recovery notice. ([#28](https://github.com/cyanheads/pubchem-mcp-server/issues/28))

## Changed

- **Output-boundary hardening** — upstream free text (descriptions, synonyms, lineage, interaction statements, assay names, GHS hazard/precautionary statement text, raw SDF) is now framed as delimited data in `content[]` via new `inlineData`/`quoteData`/`fencedData` helpers, neutralizing markdown-structure injection from PubChem-controlled strings. Applied to `pubchem_get_compound_details`, `pubchem_get_summary`, `pubchem_get_compound_interactions`, `pubchem_get_compound_3d_structure` (SDF fencing), `pubchem_get_bioactivity`, and `pubchem_get_compound_safety`. `structuredContent` is unchanged — raw values pass through verbatim. ([#27](https://github.com/cyanheads/pubchem-mcp-server/issues/27))
