search_chembl_molecule
Convert drug or compound names, synonyms, or structural strings into ChEMBL IDs, supporting exact matches or extraction from text.
Instructions
Resolve a DRUG / COMPOUND / MOLECULE (by name or structure) to a ChEMBL ID.
✅ Use this tool for drug, compound, or molecule names
(e.g., "sorafenib", "imatinib", "aspirin", "Gleevec").
⚠️ For biological targets (proteins, receptors, enzymes, genes such as
EGFR, BRCA1, TP53), use search_chembl_target instead.
Resolution path is auto-selected from the query shape:
• NAME / BRAND / SYNONYM → deterministic SPARQL, EXACT (case-insensitive) match on the molecule's skos:altLabel synonyms (which include brand and trade names — "Gleevec" → CHEMBL941 IMATINIB). Not fuzzy/substring: fix typos before calling. No relevance ranking to second-guess.
• InChIKey / InChI → deterministic SPARQL, EXACT (case-SENSITIVE) match on the RDF-stored identifier. These are canonical (toolkit-independent), so exact match is correct, e.g. "BSYNRYMUTXBXSQ-UHFFFAOYSA-N" → CHEMBL25.
• SMILES → the ChEMBL REST chemistry engine (flexmatch), NOT exact match: a SMILES is written differently by each toolkit, so flexmatch normalizes the structure first, e.g. "CC(=O)Oc1ccccc1C(=O)O" → CHEMBL25.
Structure detection is conservative (multi-word input, or input without the "InChI=" prefix / InChIKey pattern / structural punctuation, is treated as a name), so a bare-chain SMILES like "CCO" is treated as a name.
The search string can be passed as any of: query (canonical), search,
term, keyword, keywords, search_term, or name.
⚠️ mode='extract' — for a string that NAMES a drug rather than IS one.
Exact matching (the default) cannot resolve a clinical-trial intervention
string, a dosed/formulated product, or a multi-drug regimen, because none
of those is a synonym of anything: "Ustekinumab 90 mg", "Diclofenac SR",
"Ropivacaine 10% + Clonidine 1 µg/kg" all return 0 rows under 'exact'.
mode='extract' instead finds every substance NAMED INSIDE the string,
returning one result per distinct drug — so the combination above yields
ROPIVACAINE and CLONIDINE. Nested synonyms collapse to the longest match
("Sofpironium Bromide Gel" → SOFPIRONIUM BROMIDE, not also BROMIDE).
Use it as the RETRY when 'exact' returns nothing, not as the first call:
it is a text-extraction heuristic, so treat a hit as a candidate to
confirm, and note that it resolves a regimen to its COMPONENTS — it will
never return "FOLFIRI" itself, only the drugs a string spells out.
RETURNS a dict {'total_count', 'has_more', 'results'}. total_count is rows
RETURNED (capped by limit), not the full match count; has_more is true if
more exist beyond this page. Each result has 'chembl_id' (e.g. "CHEMBL25") and
'name' (rdfs:label, may be None for some structure hits). Under
mode='extract' each result additionally carries 'matched_span' (the text
that matched) and 'match_type' ('exact' if the span is the whole query,
else 'contained') — CHECK 'match_type' before trusting a hit. When a call
returns no results, a 'note' key explains why and what to try next. On
endpoint/HTTP failure this tool does NOT raise — it returns a dict with a
single 'error' key instead; CHECK FOR 'error' BEFORE READING 'results'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "exact" (default) matches the WHOLE string against a synonym; "extract" finds substances named INSIDE it. Defaults to "exact". | exact |
| name | No | ||
| term | No | ||
| limit | No | Maximum number of results to return. Defaults to 20. | |
| query | No | Drug/compound name, brand, synonym, or a structure string. Examples: "Aspirin", "Gleevec", "CC(=O)Oc1ccccc1C(=O)O", "BSYNRYMUTXBXSQ-UHFFFAOYSA-N". | |
| search | No | ||
| keyword | No | ||
| keywords | No | ||
| search_term | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||