Draw a structure
render_structureDraw a chemical structure, or a reaction scheme (reaction), as a publication-quality image (PNG by default), with its name, SMILES, formula and a link that opens it in HexSketch at hexsketch.com, where the user can edit it by drawing. Give structures as SMILES, not names. Check the name and formula returned against what you meant, and always give the user the link; where you can show a web page beside the chat (a preview pane, a browser tool), open the link there too. Draw every reaction as a scheme: reagents above the arrow, solvent, temperature, time and yield below; a whole synthesis or retrosynthesis as one scheme (then); a mechanism as steps, all on one page (with cycle: true for a catalytic cycle, drawn round a circle).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "render_structure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cycle | No | ||
| steps | No | A mechanism on one page: steps, each its species as SMILES with atom-map numbers, its curly arrows (given as for arrows) and a few words naming it. | |
| style | No | Drawing style: hexsketch (default) or acs (ACS 1996 journal style). | |
| arrows | No | Curly (electron-pushing) arrows for a mechanism step, drawn on the structure or reaction given in the same call. Give it as SMILES with atom-map numbers on the atoms the arrows touch, e.g. "[OH-:1].[CH3:2][Br:3]" with arrows [{from:[1],to:[1,2]},{from:[2,3],to:[3]}]. A mapped atom written as just its element ([C:1]) keeps its usual hydrogens; separate species are drawn close together, the attacking one beside the atom it attacks. HexSketch places each arrow clear of the drawing. | |
| format | No | Output format; default png. PDF needs save_to. | |
| reaction | No | A reaction scheme instead of a single structure: starting materials, an arrow with the reagents above it and the solvent and conditions below, and the products. Use it for every reaction or synthetic step. | |
| structure | No | The structure: SMILES (e.g. "CC(=O)Oc1ccccc1C(=O)O"), molfile or CDXML text, or a HexSketch link (https://hexsketch.com/#smiles=... or #cdxml=...). Not a name. | |
| disconnect | No | Retrosynthesis: bonds of the target to mark as disconnections, by their atoms' map numbers in the SMILES. [[1, 2]] draws a wavy line across the bond 1–2. With a reaction, the marks go on its first stage, the target: give the map numbers there only. |