Draw a structure
generate_moleculeDraw one compound as a 2D PNG/SVG structure with properties and functional groups; use for single substances, projections, chair forms, or all stereoisomers.
Instructions
Draw one compound as a 2D structure — the default for a single substance.
Writes PNG/SVG files and an interactive panel (properties, functional groups). A bare compound name ("caffeine") also means this tool, and so does a question about why one compound behaves as it does (acidity, solubility) — the answer is in its structure. A Fischer or Haworth projection of a sugar or amino acid, a chair conformation of a cyclohexane or pyranose ring, or a drawing with all H atoms, is this tool too: set view to "fischer", "haworth", "chair" or "all_h". All stereoisomers of one compound are this tool too: set stereo_variants=True (meso forms counted once).
Not this tool for: several individual structures (use batch_generate), structural differences (use compare_molecules), a reaction scheme (use generate_reaction), a data sheet (use lookup_molecule_data), a single named value such as melting point, CAS number or GHS hazards (use lookup), the IR bands or ¹H signals to expect (use predict_spectrum), a spectrum drawing (use generate_spectrum), which species of an acid dominates at a given pH (use generate_species_distribution), a rotatable 3D model or the shape in space (use generate_3d), or a protein, enzyme or antibody (use generate_protein_or_antibody).
Args: name_or_smiles: English/IUPAC name or SMILES. Peptides: "Ala-Gly-Ser" (D-Ala, Ac-, -NH2, cyclo(…)); one-letter only as "peptide:AGS" (lowercase = D). label: Display name below the structure (may be localized). formats: any of "png", "svg", "cdxml" (default png + svg; cdxml only for ChemDraw). annotate_stereo: True prints CIP descriptors (R/S, E/Z). abbreviate_groups: True draws substituents as labels (Ph, OAc, Boc). render_style: "", "compact", "presentation" or "grayscale". stereo_variants: True lists all stereoisomers (max 3 open centers) as a pick list; only when the user asks for them. view: "fischer"/"haworth"/"chair"/"all_h" opens on that drawing, only if the user names it.
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": {
"name_or_smiles": "<name_or_smiles>"
},
"name": "generate_molecule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | No | ||
| label | No | ||
| formats | No | ||
| render_style | No | ||
| name_or_smiles | Yes | ||
| annotate_stereo | No | ||
| stereo_variants | No | ||
| abbreviate_groups | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | ||
| name | No | ||
| type | No | molecule | |
| atoms | No | ||
| files | No | ||
| views | No | ||
| foundAs | No | ||
| message | No | ||
| protein | No | ||
| viewSvg | No | ||
| lipinski | No | ||
| subtitle | No | ||
| viewAtoms | No | ||
| candidates | No | ||
| cdxml_path | No | ||
| properties | No | ||
| stereoNote | No | ||
| initialView | No | ||
| viewRequest | No | ||
| projectionNote | No | ||
| stereoWarnings | No | ||
| functionalGroups | No |