chembl-search-molecules
chembl_search_moleculesDiscovery entry point for compounds. Find by name / ChEMBL ID / InChIKey with the default search_type=name (supply query), or run a structure search with search_type exact | similarity | substructure (supply structure as a SMILES). At least one of query or structure is required, and structure is required for the three structure modes. Returns ChEMBL ID, preferred name, canonical SMILES, formula, MW, AlogP, Lipinski violations, QED, max clinical phase, and the family parent_chembl_id on every row; only search_type=similarity adds a Tanimoto similarity percent. Chain molecule_chembl_id into chembl_get_bioactivities or chembl_get_drug_info. A salt often ranks ahead of its parent and carries a small share of the family's measurements, so check parent_chembl_id before chaining. A capped result carries nextCursor — pass it back as cursor with the same filters to read the next page.
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": "chembl_search_molecules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum molecules to return, up to 100 — a larger value is served at 100, with a notice saying so. Defaults to the server default (25) when omitted. | |
| query | No | Search text for search_type=name — a drug name, ChEMBL ID, or InChIKey, e.g. "imatinib" or "CHEMBL25". | |
| cursor | No | Opaque continuation token from a previous call's nextCursor — resumes where that page ended. Omit for the first page. Re-send the same query/structure/filters that minted it (only limit may change; it sets this page's size); redeeming it against different filters walks a different result set. | |
| structure | No | SMILES string for structure search, e.g. "CC(=O)Oc1ccccc1C(=O)O". Required when search_type is exact/similarity/substructure. | |
| search_type | No | name = text lookup (query); exact = exact structure match; similarity = Tanimoto ≥ threshold; substructure = contains the structure. All structure modes need `structure`. | name |
| max_phase_min | No | Restrict to compounds at or above this max clinical phase, e.g. 4 for drugs that reached approval, withdrawn ones included. Applies to every search_type; a compound with no recorded phase never passes, even at 0. | |
| similarity_threshold | No | Minimum Tanimoto similarity percent for search_type=similarity (40–100; ChEMBL rejects below 40). Every other search_type ignores it, and the notice names a value other than the default 70 as ignored. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The limit that was applied. | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of molecules returned. | |
| notice | No | Guidance when nothing matched — echoes the query and max_phase_min and suggests how to broaden — the disclosure that a limit above the maximum was served at the maximum, each input the chosen search_type ignored (query on a structure search, structure on a name search, a similarity_threshold other than 70 on any search but similarity), and, when totalCountCapped is true, why the total is a lower bound and how to narrow below it. | |
| molecules | No | Matching compounds (up to the limit). | |
| truncated | No | True when the result was capped at the limit. | |
| nextCursor | No | Opaque token for the next page — pass it back as cursor with the same filters. Absent when this page is the last one. | |
| totalCount | No | Total compounds matching before the limit was applied — a lower bound when totalCountCapped is true. | |
| totalCountCapped | No | True when totalCount is a lower bound: ChEMBL's ceiling for the search — 10000 for a name search, 30000 for a substructure search — or, with max_phase_min on a substructure search, the qualifying compounds among the first 30000 hits of a structure that has at least that many. Matches past the ceiling cannot be reached; narrow the query to bring them under it. |