Skip to main content
Glama

get_pubchem_compound_id

Retrieve the PubChem Compound ID (CID) for a given compound name. Returns JSON with the CID or an error if not found.

Instructions

Get a PubChem compound ID (CID) for a compound name.

RETURNS the PubChem Compound ID(s) as a JSON-formatted string. On upstream/HTTP failure this tool does NOT raise — it returns a plain string beginning with "Error:" (not JSON). CHECK FOR the "Error:" prefix BEFORE parsing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compound_nameYesCompound name, e.g. "resveratrol".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses that on failure the tool returns an error string starting with 'Error:' instead of raising an exception, and that the output is JSON-formatted. This is comprehensive for a simple lookup tool.

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 three short lines, front-loaded with purpose, then key details about return and error handling. No unnecessary words; every sentence provides essential information.

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 single parameter, no annotations, and presence of an output schema, the description is complete. It covers the purpose, input, return format, and error behavior, leaving no significant gaps for the agent.

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?

The input schema covers 100% of parameters and describes 'compound_name' with type string and an example value. The description adds an extra example ('resveratrol') and clarifies the return format, providing marginal added value over 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 action ('Get a PubChem compound ID') and the resource ('for a compound name'). It distinguishes from sibling tools like search_chembl_molecule or search_pdb_entity by explicitly naming PubChem.

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 (to get a CID from a compound name). It does not explicitly mention alternatives or when not to use, but the name and scope are sufficiently specific given the sibling tools.

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