Skip to main content
Glama
pubchem-chemical-compounds-mcp

pubchem-chemical-compounds-mcp

Search PubChem compounds by formula

search_by_formula
Read-onlyIdempotent

Find PubChem compounds by molecular formula and return CIDs, IUPAC names, and SMILES to help identify chemicals from formula data.

Instructions

Search PubChem compounds matching a molecular formula (e.g. "C9H8O4", "C8H10N4O2") and return CIDs with IUPAC names and SMILES.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "formula": "<formula>"
    },
    "name": "search_by_formula"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum matching compounds to return (1-25). Default 10.
formulaYesMolecular formula without spaces (e.g. "C9H8O4").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already establish that this is a read-only, idempotent, open-world, non-destructive search. Beyond that, the description adds useful output behavior by saying the results include CIDs, IUPAC names, and SMILES, which is not covered by the annotations or an output schema.

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

Conciseness5/5

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

The description is a single well-formed sentence that front-loads the action and scope, then states the return contents. There is no redundant or filler wording.

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?

For a simple two-parameter, read-only search tool with no output schema, the definition covers the core purpose, input examples, and returned fields. It is nearly complete, though it could be stronger with explicit routing guidance versus the sibling lookup tools.

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 coverage is 100%, so both parameters are already documented, including the limit range and the no-spaces formula format. The description adds illustrative formula examples, but those duplicate the schema's example rather than adding new parameter meaning.

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

Purpose4/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: searching PubChem compounds by molecular formula. It also clarifies that results are CIDs with IUPAC names and SMILES, but it does not explicitly distinguish this batch-search operation from the sibling exact-lookup tools such as get_compound_by_name.

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

Usage Guidelines3/5

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

Usage is implied by the phrase 'matching a molecular formula', so an agent can infer that a formula must be known. However, the description gives no explicit when-to-use guidance, no exclusions, and no direction to sibling alternatives for name-based or property-based lookup.

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