Search ChEMBL molecules
search_chembl_moleculeResolve drug, compound, or molecule names, brands, synonyms, InChIKeys, InChIs, or SMILES to ChEMBL IDs for unambiguous database lookup and structure identification.
Instructions
Resolve a DRUG / COMPOUND / MOLECULE (by name or structure) to a ChEMBL ID.
For drug, compound or molecule names (e.g. "sorafenib", "imatinib",
"aspirin", "Gleevec"). Biological targets (proteins, receptors, enzymes,
genes such as EGFR, BRCA1, TP53) are resolved by search_chembl_target.
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: a
trial intervention, a dosed product or a regimen ("Ustekinumab 90 mg",
"Ropivacaine 10% + Clonidine 1 µg/kg"), which return 0 rows under the
default 'exact'. It returns one result per distinct substance named inside
the string (ROPIVACAINE and CLONIDINE above); nested synonyms collapse to
the longest match. It is a text-extraction heuristic meant as the retry
after an empty 'exact' call, so a hit is a candidate to confirm, and a
regimen resolves to its components, never to "FOLFIRI" itself.
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'), which says how far to trust 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, so check for 'error' before reading 'results'.
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": "search_chembl_molecule"
}
}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 | Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError. | |
| term | No | Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError. | |
| 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 | Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError. | |
| keyword | No | Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError. | |
| keywords | No | Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError. | |
| search_term | No | Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||