Skip to main content
Glama

search_chembl_molecule

Retrieve molecule details from ChEMBL using drug names, synonyms, or structure notations like SMILES and InChI.

Instructions

Search for a DRUG / COMPOUND / MOLECULE by name or structure in ChEMBL.

✅ 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.

Molecules in ChEMBL are small-molecule drugs, drug candidates, and bioactive compounds — including approved drugs, clinical candidates, and research compounds.

Only the search string and limit are supported. The search string can be passed as any of: query (canonical), search, term, keyword, keywords, search_term, or name.

Args: query (str): Search query string referring to a drug or compound. Examples: - Generic or brand drug name (e.g., "Aspirin", "Gleevec", "Paracetamol") - Research compound name - Synonyms or alternative names - SMILES notation (chemical structure string) - InChI or InChI Key limit (int, optional): Maximum number of results to return. Defaults to 20.

Returns: dict: Dictionary containing: - 'total_count' (int): Total number of matching molecules found - 'results' (list): List of molecule dictionaries, each containing: - 'chembl_id' (str): ChEMBL molecule identifier (e.g., "CHEMBL25") - 'name' (str): Preferred molecule name (may be None for some compounds) - 'score' (float): Relevance score for the search query

Example: >>> results = await search_chembl_molecule("aspirin", limit=5) >>> print(f"Found {results['total_count']} molecules") >>> for molecule in results['results']: ... print(f"{molecule['chembl_id']}: {molecule['name']} (score: {molecule['score']})")

Output:
Found 3 molecules
CHEMBL25: Aspirin (score: 23.5)
CHEMBL1456: Acetylsalicylic acid derivative (score: 12.3)

Use Cases: - Finding ChEMBL IDs for known drugs or compounds - Discovering molecules with similar names - Searching for bioactive compounds by structure (using SMILES/InChI) - Identifying research compounds and clinical candidates

Note: - Some molecules may not have a preferred name and 'name' field will be None - Higher scores indicate better matches to the query - For structure-based searches, use SMILES or InChI notation

Raises: httpx.HTTPError: If the API request fails

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
limitNo
searchNo
termNo
keywordNo
keywordsNo
search_termNo
nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite no annotations, the description fully discloses behavior: it explains that only 'query' and 'limit' are supported, lists multiple query parameter aliases, notes that the 'name' field may be None, describes score relevance, and mentions that it raises httpx.HTTPError on failure. This covers all essential behavioral traits.

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?

The description is well-structured with clear sections (What, Args, Returns, Example, Use Cases, Note, Raises) and front-loads the purpose. However, it is somewhat verbose, containing multiple examples and redundant phrasing (e.g., listing aliases twice). A slightly more concise version would improve, but it remains highly informative.

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?

Given the tool's complexity (8 parameters, many aliases), lack of annotations, and presence of an output schema (though not detailed here), the description covers the input thoroughly, explains the output structure (total_count, results with chembl_id, name, score), includes an example, and specifies error handling. It is complete enough for an agent to invoke correctly.

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

Parameters5/5

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

The input schema has 8 parameters but 0% description coverage (no schema descriptions). The description compensates by thoroughly explaining the 'query' parameter (accepts drug names, SMILES, InChI, etc.) and the 'limit' parameter (default 20). It also lists all valid alias parameter names, adding significant meaning beyond the schema.

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 clearly states the tool's purpose: 'Search for a DRUG / COMPOUND / MOLECULE by name or structure in ChEMBL.' It specifies the resource (ChEMBL molecules) and provides examples. It distinguishes from the sibling tool `search_chembl_target` for biological targets, ensuring no ambiguity.

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?

The description explicitly advises when to use this tool ('Use this tool for drug, compound, or molecule names') and when not to ('For biological targets... use `search_chembl_target` instead'). It also explains the scope of molecules in ChEMBL, providing clear guidance on appropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dbcls/togomcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server