Look up PubChem compound ID
get_pubchem_compound_idLook up PubChem compound IDs (CIDs) from a compound name using PubChem synonym matching, including common, IUPAC, and trade names; one name may return multiple CIDs.
Instructions
Get the PubChem compound ID(s) (CID) for a compound name, via the PubChem PUG-REST name lookup (https://pubchem.ncbi.nlm.nih.gov/rest/pug/). The name is matched against PubChem synonyms (common, IUPAC, trade names), so one name can map to more than one CID.
RETURNS PubChem's JSON verbatim as a string:
{"IdentifierList": {"CID": [445154, ...]}}. On
upstream/HTTP failure this tool does NOT raise — it returns a plain string
beginning with "Error:" (not JSON). check for the "Error:" prefix before
parsing.
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": {
"compound_name": "<compound_name>"
},
"name": "get_pubchem_compound_id"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compound_name | Yes | Compound name, e.g. "resveratrol". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |