PubChem queries are executed via a robust Python wrapper script to respect
terms-of-service and handle complex JSON parsing. This script allows safe
multi-agent use of APIs.
Example: Resolve a chemical name to its Compound ID (CID)
uv run scripts/pubchem_api.py resolve --name "aspirin" --output result.json
Core Rules
Use the Wrapper: ALWAYS execute the provided helper scripts to query the
database rather than accessing the database directly. The scripts
automatically enforce the required rate limit gracefully.
Read the generated JSON output file, and process it with jq or code.
Verify Facts: ALWAYS verify information retrieved from memory with a
database query if the user asks for a specific fact that can be checked in
PubChem. Do not rely solely on internal knowledge.
Notification: If this skill is used, ensure this is mentioned in the
output.
Core Capabilities
1. Compound Resolution (Name or InChI to Identifiers) Convert chemical/trade
names or InChI strings into PubChem CIDs, SMILES, and InChIKeys.