Skip to main content
Glama
laszlopere

mcp-molecules

find_chemical_compound

Look up a chemical compound by name or molecular formula. Resolves names to formulas or formulas to names, returning matches from a bundled database and online sources.

Instructions

Look up a chemical compound by name or molecular formula.

Searches the bundled name<->formula database (a PubChem subset) first, then the writable user cache, then -- unless disabled -- the online fallback (PubChem, Wikidata, and, when an API key is set, EPA CompTox). A name resolves to its molecular formula(e); a formula resolves to the compound name(s) sharing it (isomers), ordered with the preferred name first. The direction is chosen by by. Returns the query, how it was interpreted (interpreted_as), the normalized Hill-system canonicalization of the query whenever it parses as a formula (e.g. 'O6C6H12' -> 'C6H12O6'; null when it is not a parseable formula), the matches (each {"name", "formula"}, the preferred result first), and the resolving source / license.

Raises ValueError if nothing matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesCompound to look up -- either a name or a molecular formula. Names match the canonical name or any alias, case-insensitively, ignoring trailing registry annotations like '(9CI)' or '(USAN)'. Formulae are canonicalized to the Hill system, so 'C6H12O6', 'O6C6H12', and 'C₆H₁₂O₆' are equivalent. Examples: 'aspirin', 'acetylsalicylic acid', 'H2O', 'C9H8O4'.
byNoHow to read the query. 'auto' (default) treats a parseable formula as a formula and anything else as a name, falling back to the other direction on a miss. 'name' or 'formula' pin it.auto
limitNoMaximum number of compounds to return for a formula lookup. Isomers share a formula; results are ordered with the most notable (preferred) name first.
Behavior5/5

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

With no annotations provided, the description carries full burden. It details search sources, interpretation logic (auto/name/formula), canonicalization (Hill system, trailing registry annotations), error raising ('ValueError'), and even sample output fields. This is exceptionally transparent.

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 details search scope, parameters, and output. While slightly verbose, every sentence adds value. It could be trimmed slightly without losing meaning.

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?

Despite lacking an output schema, the description fully explains all return fields (query, interpreted_as, normalized, matches, source, license) and error behavior. Combined with 100% schema coverage for parameters, this is a complete and self-contained definition.

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%, but the description adds valuable context beyond schema: explains formula canonicalization examples, auto direction fallback, and the meaning of 'preferred name'. This enhances agent understanding without being redundant.

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 starts with a clear verb+resource: 'Look up a chemical compound by name or molecular formula.' It distinguishes itself from sibling tools like 'info', 'isotope_distribution', and 'molecular_weight_calculator' by focusing on name/formula resolution.

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 explicitly outlines the search order (bundled database, user cache, online fallback) and the direction selection via the 'by' parameter. It implies use when identifying compounds, but lacks explicit when-not-to-use guidance.

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/laszlopere/mcp-molecules'

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