Skip to main content
Glama

Batch Query Chemical Compounds

mychem.chemicals.batch_query
Read-onlyIdempotent

Retrieve annotations for up to 100 chemical compounds in a single request by providing an array of chemical names or identifiers. Returns ChEBI name, ChEMBL preferred name and clinical phase, PubChem CID, molecular formula and weight, DrugBank drug groups, and PharmGKB name for each compound in one call. Ideal for enriching compound lists from drug screening assays, annotating molecule libraries, building pharmacology databases, or cross-referencing chemicals across naming conventions (INN, brand names, IUPAC names). Compounds not found in any database are marked with found=false. Mix different name formats and identifiers freely in a single batch request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesArray of chemical queries to look up in a single request. Each element can be a chemical name, synonym, or identifier (up to 100 entries). Example: ["aspirin", "ibuprofen", "acetaminophen"]. Each query is matched against common names, synonyms, and identifiers. Returns one best-match annotation per query.
fieldsNoComma-separated annotation fields to return for each chemical. 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, drugbank.name, drugbank.groups, pharmgkb.name. Limit fields for large batches to reduce response size.
scopesNoComma-separated fields to search within for each query in the batch. Default: chebi.name,chembl.pref_name,drugbank.name,pubchem.cid — searches across common name fields. Use "chebi.inchikey" to match exact InChIKeys.chebi.name,chembl.pref_name,drugbank.name,pubchem.cid

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.3/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, covering safety. The description adds valuable behavioral detail: 'Compounds not found in any database are marked with found=false' and 'Returns one best-match annotation per query.' These clarify response behavior beyond the schema, so the description meaningfully supplements annotations without contradiction.

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 a single, well-structured paragraph that front-loads the core action, then lists return fields, use cases, and edge-case behavior. It is longer than minimal but each sentence adds value. The structure is logical and easy to scan, so it earns a 4 rather than a 5.

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

Completeness4/5

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

With an output schema present, return values are defined. The description covers purpose, batch limits (up to 100), accepted input types, default fields, and not-found behavior. It omits details like rate limits or error handling, but those are not essential given the annotations and schema. Overall, it is sufficiently complete for an agent to call correctly.

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 parameters are well-documented. The description adds semantic value by stating that queries can mix name formats and identifiers freely, and lists the default fields returned. It does not explain the 'fields' or 'scopes' parameters, but the schema handles those. Given high coverage, the extra context raises it above baseline.

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 verb (retrieve annotations) and the resource (chemical compounds in batch), and explicitly lists the fields returned. It distinguishes itself from single-query tools by emphasizing the batch capability and use cases like enriching compound lists, which helps an agent select it appropriately.

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 provides clear context for when to use this tool: when enriching lists, annotating libraries, building databases, or cross-referencing across naming conventions. It implies batch use but does not explicitly name sibling alternatives like mychem.chemicals.annotation or search, nor state when not to use it. A 4 reflects strong context with a minor gap in explicit exclusion guidance.

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.