Skip to main content
Glama

Search Chemical Compounds

mychem.chemicals.search
Read-onlyIdempotent

Search the MyChem.info database of 197M+ annotated chemical compounds using a flexible query syntax. Query by: common name (e.g. "aspirin"), IUPAC name (e.g. "acetylsalicylic acid"), InChIKey (e.g. "BSYNRYMUTXBXSQ-UHFFFAOYSA-N"), molecular formula (e.g. "C9H8O4"), ChEMBL ID (e.g. "CHEMBL25"), PubChem CID (e.g. "pubchem.cid:2244"), DrugBank ID (e.g. "DB00945"), or field-scoped queries (e.g. "drugbank.groups:approved AND chembl.max_phase:4"). Each result includes chemical names across databases (ChEBI, ChEMBL, DrugBank, PharmGKB), structural properties (molecular formula, weight, XLogP, H-bond donors/acceptors, TPSA, rotatable bonds), drug development phase, ATC classification codes, and approval status. Integrates DrugBank, ChEMBL, ChEBI, PubChem, PharmGKB, SIDER, DrugCentral, NDC, and 16+ annotation sources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesChemical search query. Supports: common name (e.g. "aspirin"), IUPAC name (e.g. "acetylsalicylic acid"), InChIKey (e.g. "BSYNRYMUTXBXSQ-UHFFFAOYSA-N"), molecular formula (e.g. "C9H8O4"), ChEMBL ID (e.g. "CHEMBL25"), PubChem CID (e.g. "pubchem.cid:2244"), DrugBank ID (e.g. "DB00945"), or field-scoped queries (e.g. "chebi.name:ibuprofen", "drugbank.groups:approved", "chembl.max_phase:4"). Supports Lucene boolean operators AND/OR/NOT.
sizeNoMaximum number of chemical results to return (1–50, default 10).
fieldsNoComma-separated annotation fields to return per hit. Default: chebi.name, chebi.definition, chebi.formula, chebi.mass, chembl.pref_name, chembl.max_phase, chembl.molecule_properties, pubchem.cid, pubchem.molecular_formula, pubchem.molecular_weight, pubchem.xlogp, drugbank.name, drugbank.groups, pharmgkb.name. Use "all" for every source.
scopesNoComma-separated fields to search within. Default: searches all text fields. Examples: "chebi.name,chembl.pref_name,drugbank.name" to search only common names, or "chebi.inchikey" to search by exact InChIKey structure.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint false, so the safety profile is covered. The description adds useful behavioral context beyond annotations by specifying the database scale, the return content (cross-database names, structural properties, drug development phase, ATC codes), and the breadth of integrated sources.

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 front-loaded with the core purpose, then query syntax, then expected results, and is reasonably well organized. It is somewhat long and duplicates query examples already present in the schema, but the examples are relevant and the density of useful information justifies the length.

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 strong read-only/idempotent annotations, complete schema descriptions for all four parameters, and an existing output schema, the description is contextually complete. It covers the search capability, query flexibility, and result composition without requiring an agent to infer missing details.

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

Parameters3/5

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

Schema description coverage is 100%, and every parameter already has detailed descriptions with examples, constraints, and defaults. The description repeats the q-parameter query syntax but adds little new parameter-specific meaning beyond the schema, so the baseline of 3 is appropriate.

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 states a specific verb and resource: 'Search the MyChem.info database of 197M+ annotated chemical compounds.' It clearly distinguishes this from the sibling tools by describing it as a flexible search over chemicals rather than annotation, batch querying, or metadata access.

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

Usage Guidelines4/5

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

The description gives clear usage context by enumerating supported query types: common name, IUPAC name, InChIKey, molecular formula, ChEMBL ID, PubChem CID, DrugBank ID, and field-scoped queries. It does not explicitly compare against siblings or state when not to use this tool, so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.