Get Compound Image
pubchem_get_compound_imageFetch a 2D structure diagram (PNG) for a compound by PubChem CID, with optional small or large size.
Instructions
Fetch a 2D structure diagram (PNG image) for a compound by CID.
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": {
"cid": "<cid>"
},
"name": "pubchem_get_compound_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cid | Yes | PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds. | |
| size | No | Image size: "small" (100x100) or "large" (300x300). Default: "large". | large |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cid | No | PubChem Compound ID. | |
| error | No | Present when the call failed. Absent on success. | |
| width | No | Image width in pixels. | |
| height | No | Image height in pixels. | |
| mimeType | No | MIME type — always "image/png". | |
| imageBase64 | No | Base64-encoded PNG image data. |