Skip to main content
Glama

Search ChEMBL molecules

search_chembl_molecule
Read-only

Resolve 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

NameRequiredDescriptionDefault
modeNo"exact" (default) matches the WHOLE string against a synonym; "extract" finds substances named INSIDE it. Defaults to "exact".exact
nameNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
termNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
limitNoMaximum number of results to return. Defaults to 20.
queryNoDrug/compound name, brand, synonym, or a structure string. Examples: "Aspirin", "Gleevec", "CC(=O)Oc1ccccc1C(=O)O", "BSYNRYMUTXBXSQ-UHFFFAOYSA-N".
searchNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
keywordNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
keywordsNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
search_termNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.34.1
    • addedInput schema / properties / keyword / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / keywords / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / name / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / search / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / search_term / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / term / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
  2. Changed1 schema field changedv2.0.1
    • addedInput schema / properties / mode
      Added value: +{
      +  "default": "exact",
      +  "description": "\"exact\" (default) matches the WHOLE string against a\nsynonym; \"extract\" finds substances named INSIDE it. Defaults to \"exact\".",
      +  "type": "string"
      +}
  3. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of results to return. Defaults to 20."
    • addedInput schema / properties / query / description
      Added value: +"Drug/compound name, brand, synonym, or a structure string.\nExamples: \"Aspirin\", \"Gleevec\", \"CC(=O)Oc1ccccc1C(=O)O\",\n\"BSYNRYMUTXBXSQ-UHFFFAOYSA-N\"."
  4. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the read-only/open-world annotations, it discloses the resolution mechanics: exact SPARQL for names/InChIKeys, flexmatch for SMILES, conservative structure detection, alias precedence, `total_count` being capped by `limit`, the `note` key on empty results, and the non-raising error-dict behavior. This is substantially more than the annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded and well-structured with bullets separating name, InChIKey, and SMILES paths. It is long but dense; some material, such as the full alias enumeration and return-dict shape, repeats what the schema and output schema already provide.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a multi-path, open-world search tool with nine parameters, the description covers routing, resolution behavior, result fields, empty-result notes, and error handling. Even though an output schema exists, the extra explanation of `matched_span` and `match_type` trust levels is appropriately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it explains the exact-versus-flexmatch consequences of input shape, the conservative detection rule that treats bare SMILES like 'CCO' as a name, and the semantics of `mode='extract'` including multi-substance splitting. The alias list is partly redundant with the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Resolve a DRUG / COMPOUND / MOLECULE ... to a ChEMBL ID.' It explicitly separates itself from the sibling `search_chembl_target` by naming protein/receptor/enzyme/gene queries as out of scope, so an agent can route correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states exactly when to use this tool versus the alternative: drug/compound names here, biological targets in `search_chembl_target`. It also gives an explicit retry rule for `mode='extract'` after an empty `exact` call, with concrete examples of trial interventions and regimens.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.