{"openapi":"3.0.3","info":{"title":"Gnist Context — PubChem","description":"Chemical compound data — structures, properties, bioactivity, and safety information.\n\n- **MCP endpoint:** `https://context.gnist.ai/mcp/pubchem/`\n- **Toolkit page:** `/toolkits/pubchem`\n- **Full API spec:** `/api/openapi.json`\n- **Get an API key:** `/signup`","version":"1.0.0","contact":{"name":"GnistAI","url":"https://gnist.ai"}},"servers":[{"url":"https://context.gnist.ai","description":"Production"}],"paths":{"/rest/pubchem/get_compound":{"post":{"tags":["Science"],"summary":"get_compound","description":"Look up a chemical compound by name, CID, InChIKey, or SMILES.\n\nPubChem covers 100M+ chemical structures. Returns molecular formula, weight,\nSMILES, InChI, IUPAC name, and key physicochemical descriptors.\n\nArgs:\n    identifier: The compound identifier. Examples:\n        - By name: \"aspirin\", \"caffeine\", \"glucose\"\n        - By CID: \"2244\" (aspirin's PubChem CID)\n        - By InChIKey: \"BSYNRYMUTXBXSQ-UHFFFAOYSA-N\"\n        - By SMILES: \"CC(=O)Oc1ccccc1C(=O)O\"\n    namespace: How to interpret the identifier. One of:\n        \"name\" (default), \"cid\", \"inchikey\", \"smiles\".\n\nReturns:\n    Compound record with cid, iupac_name, molecular_formula, molecular_weight,\n    canonical_smiles, isomeric_smiles, inchi, inchikey, xlogp, exact_mass,\n    tpsa, hbond_donors, hbond_acceptors, rotatable_bonds, heavy_atom_count,\n    charge, and complexity.","operationId":"pubchem_get_compound","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"identifier":{"description":"The compound identifier. Examples: - By name: \"aspirin\", \"caffeine\", \"glucose\" - By CID: \"2244\" (aspirin's PubChem CID) - By InChIKey: \"BSYNRYMUTXBXSQ-UHFFFAOYSA-N\" - By SMILES: \"CC(=O)O...","type":"string"},"namespace":{"default":"name","description":"How to interpret the identifier. One of: \"name\" (default), \"cid\", \"inchikey\", \"smiles\".","type":"string"}},"required":["identifier"],"type":"object"}}}}}},"/rest/pubchem/search_compounds":{"post":{"tags":["Science"],"summary":"search_compounds","description":"Search PubChem for chemical compounds by name or keyword.\n\nReturns a compact list of matching compounds (CID, IUPAC name, formula, weight).\nUse get_compound with the returned CID for full details.\n\nArgs:\n    query: Chemical name or keyword (e.g., \"aspirin\", \"beta-lactam\", \"serotonin\").\n    max_results: Number of results to return (1–50, default 10).\n\nReturns:\n    List of matching compounds with cid, iupac_name, molecular_formula, molecular_weight.","operationId":"pubchem_search_compounds","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"query":{"description":"Chemical name or keyword (e.g., \"aspirin\", \"beta-lactam\", \"serotonin\").","type":"string"},"max_results":{"default":10,"description":"Number of results to return (1–50, default 10).","type":"integer"}},"required":["query"],"type":"object"}}}}}},"/rest/pubchem/get_compound_properties":{"post":{"tags":["Science"],"summary":"get_compound_properties","description":"Fetch physicochemical properties for a PubChem compound by CID.\n\nReturns a richer property set than get_compound, including stereochemistry\ncounts, covalent units, and monoisotopic mass.\n\nArgs:\n    cid: PubChem Compound ID (e.g., 2244 for aspirin). Found in search_compounds results.\n    properties: Optional list of specific property names to fetch. If omitted, returns\n        all standard properties. Available properties include:\n        MolecularFormula, MolecularWeight, CanonicalSMILES, IsomericSMILES,\n        InChI, InChIKey, IUPACName, XLogP, ExactMass, MonoisotopicMass,\n        TPSA, Complexity, Charge, HBondDonorCount, HBondAcceptorCount,\n        RotatableBondCount, HeavyAtomCount, CovalentUnitCount,\n        AtomStereoCount, BondStereoCount.\n\nReturns:\n    Dict of property name → value for the requested properties.","operationId":"pubchem_get_compound_properties","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"cid":{"description":"PubChem Compound ID (e.g., 2244 for aspirin). Found in search_compounds results.","type":"integer"},"properties":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Optional list of specific property names to fetch. If omitted, returns all standard properties. Available properties include: MolecularFormula, MolecularWeight, CanonicalSMILES, IsomericSMILES, InC...","default":null}},"required":["cid"],"type":"object"}}}}}},"/rest/pubchem/find_similar_compounds":{"post":{"tags":["Science"],"summary":"find_similar_compounds","description":"Find structurally similar compounds using 2D Tanimoto similarity.\n\nUses PubChem's fast 2D fingerprint similarity search. Useful for identifying\ndrug analogs, structural scaffolds, or related molecules.\n\nArgs:\n    cid: PubChem Compound ID to use as the query structure.\n    threshold: Tanimoto similarity threshold (0–100, default 90). Higher values\n        return only very close structural matches. 90 is a common threshold for\n        drug analog searches.\n    max_results: Number of similar compounds to return (1–50, default 10).\n\nReturns:\n    List of similar compounds with cid, iupac_name, molecular_formula, molecular_weight.","operationId":"pubchem_find_similar_compounds","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"cid":{"description":"PubChem Compound ID to use as the query structure.","type":"integer"},"threshold":{"default":90,"description":"Tanimoto similarity threshold (0–100, default 90). Higher values return only very close structural matches. 90 is a common threshold for drug analog searches.","type":"integer"},"max_results":{"default":10,"description":"Number of similar compounds to return (1–50, default 10).","type":"integer"}},"required":["cid"],"type":"object"}}}}}},"/rest/pubchem/report_feedback":{"post":{"tags":["Science"],"summary":"report_feedback","description":"Report a bug, feature request, or general feedback for this data source.\n\nUse this when something doesn't work as expected, when you'd like\na new feature, or when you have suggestions for improvement.\n\nArgs:\n    feedback: Describe the issue or suggestion.\n    feedback_type: One of 'bug', 'feature_request', or 'general'.","operationId":"pubchem_report_feedback","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"feedback":{"type":"string"},"feedback_type":{"default":"general","type":"string"}},"required":["feedback"],"type":"object"}}}}}}},"tags":[{"name":"Science","description":"Data sources: Science"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"gnist-api-key","description":"API key passed via request header."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"gnist_api_key","description":"API key passed via query parameter."}}}}