Skip to main content
Glama

Get Compound Safety

pubchem_get_compound_safety
Read-onlyIdempotent

Fetch GHS hazard classifications and safety data for one or more compounds by PubChem CID, including signal words, pictograms, H-codes, and P-codes.

Instructions

Get GHS (Globally Harmonized System) hazard classification and safety data for one or more compounds by CID. Returns signal word, pictograms, hazard statements (H-codes), and precautionary statements (P-codes) per compound, merged across sources, plus each source's own classification — its signal word, pictograms, H-codes with ECHA notifier agreement percentages, and notification counts — since sources often disagree. Reports ECHA "Not Classified" verdicts as their own status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidsYesPubChem Compound IDs to fetch safety data for. The per-call cap is 25: the first 25 are looked up, and any past that (up to 1000 in all) are returned in unprocessed, in input order, and reported in cappedInputs. Resolve from names/SMILES with pubchem_search_compounds.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when one or more CIDs returned no hazard classification, listing the unrecognized CIDs to verify, the CIDs that exist but carry no deposited classification, and the CIDs whose only classifications are "Not Classified" verdicts, each separately.
resultsNoSafety results, one per CID looked up (input order preserved). CIDs past the per-call cap are in unprocessed instead.
unprocessedNoCIDs past the per-call cap of 25, in input order, not looked up. Pass them in a follow-up call. Omitted when every CID was looked up.
cappedInputsNoInputs that asked for more than their per-call cap, with the value requested and the value served. An ID batch lists the IDs past the cap in unprocessed. Omitted when every input was within its cap.
withDataCountNoCIDs with a GHS classification on file (status "ok" or "not_classified").
requestedCountNoCIDs requested, including any past the per-call cap left in unprocessed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changedv0.7.0
    • changedInput schema / properties / cids / description
      Previous value: -"PubChem Compound IDs to fetch safety data for (1-25). Resolve from names/SMILES with pubchem_search_compounds."New value: +"PubChem Compound IDs to fetch safety data for. The per-call cap is 25: the first 25 are looked up, and any past that (up to 1000 in all) are returned in unprocessed, in input order, and reported in cappedInputs. Resolve from names/SMILES with pubchem_search_compounds."
    • changedInput schema / properties / cids / items / maximum
      Previous value: -9007199254740991New value: +2147483647
    • changedInput schema / properties / cids / maxItems
      Previous value: -25New value: +1000
    • addedOutput schema / properties / cappedInputs
      Added value: +{
      +  "description": "Inputs that asked for more than their per-call cap, with the value requested and the value served. An ID batch lists the IDs past the cap in unprocessed. Omitted when every input was within its cap.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One input served at its per-call cap.",
      +    "properties": {
      +      "input": {
      +        "description": "Input name, e.g. \"maxResults\" or \"cids\".",
      +        "type": "string"
      +      },
      +      "requested": {
      +        "description": "Value requested: the page size, or the number of IDs in the batch.",
      +        "type": "number"
      +      },
      +      "served": {
      +        "description": "Value served: the per-call cap.",
      +        "type": "number"
      +      },
      +      "unprocessed": {
      +        "description": "ID batches only: IDs past the cap, listed in unprocessed in input order.",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "input",
      +      "requested",
      +      "served"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery guidance when one or more CIDs returned no GHS data, listing the unrecognized CIDs to verify separately from the CIDs that exist but carry no deposited classification."New value: +"Guidance when one or more CIDs returned no hazard classification, listing the unrecognized CIDs to verify, the CIDs that exist but carry no deposited classification, and the CIDs whose only classifications are \"Not Classified\" verdicts, each separately."
    • changedOutput schema / properties / requestedCount / description
      Previous value: -"CIDs requested."New value: +"CIDs requested, including any past the per-call cap left in unprocessed."
    • changedOutput schema / properties / results / description
      Previous value: -"Safety results, one per requested CID (input order preserved)."New value: +"Safety results, one per CID looked up (input order preserved). CIDs past the per-call cap are in unprocessed instead."
    • addedOutput schema / properties / results / items / properties / ghs / properties / classifications
      Added value: +{
      +  "description": "Each source's classification in PubChem's order — EU harmonised, the ECHA C&L aggregate, single-company ECHA notifications, NITE-CMC revisions, and others. Sources can disagree; the top-level fields merge them.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One source's GHS classification, kept whole.",
      +    "properties": {
      +      "hazardCodes": {
      +        "description": "Hazard codes this classification assigns. Empty for a \"Not Classified\" verdict.",
      +        "items": {
      +          "additionalProperties": false,
      +          "description": "Hazard code assigned by this classification.",
      +          "properties": {
      +            "agreement": {
      +              "description": "Share of notifying companies that assigned this code, exactly as PubChem prints it (e.g. \"37.7%\", \"> 99.9%\"). Present only where PubChem prints one beside the code, which is ECHA C&L classifications; read it against \"notifications\" — a single-company notification reports 100%.",
      +              "type": "string"
      +            },
      +            "code": {
      +              "description": "H-code (e.g. \"H319\"). Statement text is in the top-level hazardStatements.",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "code"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "notClassified": {
      +        "description": "True when this classification is ECHA's \"Not Classified\" verdict: notifiers assessed the compound and found it meets no GHS hazard criteria. Omitted otherwise.",
      +        "type": "boolean"
      +      },
      +      "notifications": {
      +        "description": "Notifier counts behind an ECHA classification: the first line of ECHA's C&L notifications summary (e.g. \"Aggregated GHS information provided per 13886 reports by companies from 79 notifications…\"), or for a \"Not Classified\" verdict the verdict line (e.g. \"Reported as not meeting GHS hazard criteria by 188 of 203 companies…\"). Omitted for sources that deposit no counts.",
      +        "type": "string"
      +      },
      +      "pictograms": {
      +        "description": "This classification's pictogram labels.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "signalWord": {
      +        "description": "This classification's signal word. Omitted when the source assigns none.",
      +        "type": "string"
      +      },
      +      "source": {
      +        "description": "Depositing source (e.g. \"European Chemicals Agency (ECHA)\", \"NITE-CMC\"). Omitted when PubChem names no reference for the classification.",
      +        "type": "string"
      +      },
      +      "sourceRecord": {
      +        "description": "The source's own record title (e.g. \"Ethanol - FY2013 (Revised classification)\", \"Ethanol (EC: 200-578-6)\"). Tells revisions of one source, and the ECHA C&L aggregate from single-company ECHA notifications, apart.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "pictograms",
      +      "hazardCodes"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / results / items / properties / ghs / properties / hazardStatements / description
      Previous value: -"GHS hazard statements."New value: +"GHS hazard statements, union across classifications. A code here may come from a single source — see classifications for which source assigned it and with what notifier agreement."
    • changedOutput schema / properties / results / items / properties / ghs / properties / pictograms / description
      Previous value: -"GHS pictogram labels (e.g. \"Flammable\", \"Toxic\")."New value: +"GHS pictogram labels (e.g. \"Flammable\", \"Acute Toxic\"), union across classifications."
    • changedOutput schema / properties / results / items / properties / ghs / properties / precautionaryStatements / description
      Previous value: -"GHS precautionary statements."New value: +"GHS precautionary statements, union across classifications."
    • changedOutput schema / properties / results / items / properties / ghs / properties / signalWord / description
      Previous value: -"GHS signal word: \"Danger\" or \"Warning\"."New value: +"GHS signal word, \"Danger\" or \"Warning\": the most severe any classification assigns. Omitted when none assigns one."
    • changedOutput schema / properties / results / items / properties / ghs / required
      Previous value: -[
      -  "pictograms",
      -  "hazardStatements",
      -  "precautionaryStatements"
      -]New value: +[
      +  "pictograms",
      +  "hazardStatements",
      +  "precautionaryStatements",
      +  "classifications"
      +]
    • changedOutput schema / properties / results / items / properties / hasData / description
      Previous value: -"Whether GHS safety data is available for this compound."New value: +"Whether a GHS classification is on file for this compound (status \"ok\" or \"not_classified\"); \"ghs\" is present exactly when this is true."
    • changedOutput schema / properties / results / items / properties / source / description
      Previous value: -"Data source attribution."New value: +"Sources that deposited a GHS classification, in PubChem's order, joined with \"; \"."
    • changedOutput schema / properties / results / items / properties / status / description
      Previous value: -"Outcome for this CID. \"ok\": GHS data returned. \"no_ghs_data\": the compound exists in PubChem but has no deposited GHS classification. \"cid_not_found\": PubChem has no record for this CID at all — the identifier is wrong, so verify it with pubchem_search_compounds rather than concluding the compound is unclassified."New value: +"Outcome for this CID. \"ok\": GHS hazard classification returned. \"not_classified\": every deposited classification is an ECHA \"Not Classified\" verdict — notifiers assessed the compound and found it meets no GHS hazard criteria; the verdicts and their notifier counts are in ghs.classifications. \"no_ghs_data\": the compound exists in PubChem but has no deposited GHS classification. \"cid_not_found\": PubChem has no record for this CID at all — the identifier is wrong, so verify it with pubchem_search_compounds rather than concluding the compound is unclassified."
    • changedOutput schema / properties / results / items / properties / status / enum
      Previous value: -[
      -  "ok",
      -  "no_ghs_data",
      -  "cid_not_found"
      -]New value: +[
      +  "ok",
      +  "not_classified",
      +  "no_ghs_data",
      +  "cid_not_found"
      +]
    • addedOutput schema / properties / unprocessed
      Added value: +{
      +  "description": "CIDs past the per-call cap of 25, in input order, not looked up. Pass them in a follow-up call. Omitted when every CID was looked up.",
      +  "items": {
      +    "type": "number"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / withDataCount / description
      Previous value: -"CIDs with GHS safety data available."New value: +"CIDs with a GHS classification on file (status \"ok\" or \"not_classified\")."
  2. Changed2 schema fields changedv0.6.5
    • removedInput schema / properties / cids / items / exclusiveMinimum
      Removed value: -0
    • addedInput schema / properties / cids / items / minimum
      Added value: +1
  3. Changed6 schema fields changedv0.6.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "results",
      +      "requestedCount",
      +      "withDataCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode.",
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "results",
      -  "requestedCount",
      -  "withDataCount"
      -]
  4. Changed6 schema fields changedv0.6.0
    • changedOutput schema / properties / notice / description
      Previous value: -"Cross-tool guidance when one or more CIDs have no GHS data, pointing to an alternative source."New value: +"Recovery guidance when one or more CIDs returned no GHS data, listing the unrecognized CIDs to verify separately from the CIDs that exist but carry no deposited classification."
    • addedOutput schema / properties / results / items / properties / ghs / properties / precautionaryStatements / items / properties / decoded
      Added value: +{
      +  "description": "Whether \"statement\" carries the standard text. False for codes needing label-specific fill text the depositor must supply (disposal method, firefighting agent, first-aid reference) and for codes outside the decoder table; the code itself is still authoritative.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / results / items / properties / ghs / properties / precautionaryStatements / items / properties / statement / description
      Previous value: -"Precautionary statement text."New value: +"Standard precautionary statement text for the code. Empty string when \"decoded\" is false — PubChem deposits P-codes without text, so a blank statement means the code was not decoded, never that the depositor supplied an empty statement."
    • changedOutput schema / properties / results / items / properties / ghs / properties / precautionaryStatements / items / required
      Previous value: -[
      -  "code",
      -  "statement"
      -]New value: +[
      +  "code",
      +  "statement",
      +  "decoded"
      +]
    • addedOutput schema / properties / results / items / properties / status
      Added value: +{
      +  "description": "Outcome for this CID. \"ok\": GHS data returned. \"no_ghs_data\": the compound exists in PubChem but has no deposited GHS classification. \"cid_not_found\": PubChem has no record for this CID at all — the identifier is wrong, so verify it with pubchem_search_compounds rather than concluding the compound is unclassified.",
      +  "enum": [
      +    "ok",
      +    "no_ghs_data",
      +    "cid_not_found"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / results / items / required
      Previous value: -[
      -  "cid",
      -  "hasData"
      -]New value: +[
      +  "cid",
      +  "hasData",
      +  "status"
      +]
  5. Changed12 schema fields changedv0.2.2
    • removedInput schema / properties / cid
      Removed value: -{
      -  "description": "PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds.",
      -  "exclusiveMinimum": 0,
      -  "maximum": 9007199254740991,
      -  "type": "integer"
      -}
    • addedInput schema / properties / cids
      Added value: +{
      +  "description": "PubChem Compound IDs to fetch safety data for (1-25). Resolve from names/SMILES with pubchem_search_compounds.",
      +  "items": {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  "maxItems": 25,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "cid"
      -]New value: +[
      +  "cids"
      +]
    • removedOutput schema / properties / cid
      Removed value: -{
      -  "description": "PubChem Compound ID.",
      -  "type": "number"
      -}
    • removedOutput schema / properties / ghs
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "GHS classification data.",
      -  "properties": {
      -    "hazardStatements": {
      -      "description": "GHS hazard statements.",
      -      "items": {
      -        "additionalProperties": false,
      -        "description": "GHS hazard statement entry.",
      -        "properties": {
      -          "code": {
      -            "description": "H-code (e.g. \"H225\").",
      -            "type": "string"
      -          },
      -          "statement": {
      -            "description": "Hazard statement text.",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "statement"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "pictograms": {
      -      "description": "GHS pictogram labels (e.g. \"Flammable\", \"Toxic\").",
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "precautionaryStatements": {
      -      "description": "GHS precautionary statements.",
      -      "items": {
      -        "additionalProperties": false,
      -        "description": "GHS precautionary statement entry.",
      -        "properties": {
      -          "code": {
      -            "description": "P-code (e.g. \"P210\").",
      -            "type": "string"
      -          },
      -          "statement": {
      -            "description": "Precautionary statement text.",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "statement"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "signalWord": {
      -      "description": "GHS signal word: \"Danger\" or \"Warning\".",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "pictograms",
      -    "hazardStatements",
      -    "precautionaryStatements"
      -  ],
      -  "type": "object"
      -}
    • removedOutput schema / properties / hasData
      Removed value: -{
      -  "description": "Whether GHS safety data is available for this compound.",
      -  "type": "boolean"
      -}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Cross-tool guidance when one or more CIDs have no GHS data, pointing to an alternative source.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / requestedCount
      Added value: +{
      +  "description": "CIDs requested.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / results
      Added value: +{
      +  "description": "Safety results, one per requested CID (input order preserved).",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Per-CID safety result.",
      +    "properties": {
      +      "cid": {
      +        "description": "PubChem Compound ID.",
      +        "type": "number"
      +      },
      +      "ghs": {
      +        "additionalProperties": false,
      +        "description": "GHS classification data.",
      +        "properties": {
      +          "hazardStatements": {
      +            "description": "GHS hazard statements.",
      +            "items": {
      +              "additionalProperties": false,
      +              "description": "GHS hazard statement entry.",
      +              "properties": {
      +                "code": {
      +                  "description": "H-code (e.g. \"H225\").",
      +                  "type": "string"
      +                },
      +                "statement": {
      +                  "description": "Hazard statement text.",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "code",
      +                "statement"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "pictograms": {
      +            "description": "GHS pictogram labels (e.g. \"Flammable\", \"Toxic\").",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "precautionaryStatements": {
      +            "description": "GHS precautionary statements.",
      +            "items": {
      +              "additionalProperties": false,
      +              "description": "GHS precautionary statement entry.",
      +              "properties": {
      +                "code": {
      +                  "description": "P-code (e.g. \"P210\").",
      +                  "type": "string"
      +                },
      +                "statement": {
      +                  "description": "Precautionary statement text.",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "code",
      +                "statement"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "signalWord": {
      +            "description": "GHS signal word: \"Danger\" or \"Warning\".",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "pictograms",
      +          "hazardStatements",
      +          "precautionaryStatements"
      +        ],
      +        "type": "object"
      +      },
      +      "hasData": {
      +        "description": "Whether GHS safety data is available for this compound.",
      +        "type": "boolean"
      +      },
      +      "source": {
      +        "description": "Data source attribution.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "cid",
      +      "hasData"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / source
      Removed value: -{
      -  "description": "Data source attribution.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / withDataCount
      Added value: +{
      +  "description": "CIDs with GHS safety data available.",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "cid",
      -  "hasData"
      -]New value: +[
      +  "results",
      +  "requestedCount",
      +  "withDataCount"
      +]
  6. Changed3 schema fields changedv0.1.22
    • changedInput schema / properties / cid / description
      Previous value: -"PubChem Compound ID."New value: +"PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds."
    • addedOutput schema / properties / ghs / properties / hazardStatements / items / description
      Added value: +"GHS hazard statement entry."
    • addedOutput schema / properties / ghs / properties / precautionaryStatements / items / description
      Added value: +"GHS precautionary statement entry."
  7. First observedv0.1.11

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish the read-only/idempotent safety profile, but the description goes well beyond them: data is merged across sources, per-source classifications are returned alongside the merge because sources often disagree, ECHA notifier agreement percentages and notification counts are included, and ECHA "Not Classified" verdicts are surfaced as a distinct status. This is unusually rich behavioral disclosure for a read tool.

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?

Front-loaded with the core purpose, then layered with return-shape and source-disagreement detail; every clause carries information. The second sentence is dense and runs long, but nothing is redundant.

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?

An output schema exists so return values needn't be explained, yet the description still characterizes the return shape and the cross-source merge semantics that an agent must anticipate. Combined with annotations covering safety and the fully-documented parameter, nothing needed for correct invocation is missing.

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 description coverage is 100% and the single cids parameter is fully documented there, including the 25-per-call cap and cappedInputs reporting. The description only adds the 'one or more compounds' batch framing, so it neither adds much nor leaves gaps.

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?

States a specific verb and resource — retrieve GHS hazard classification and safety data for compounds by CID — and enumerates the payload (signal word, pictograms, H-codes, P-codes). This clearly separates it from sibling tools like get_compound_details, get_compound_xrefs, or get_compound_image.

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?

Gives clear context for invocation: compounds are keyed by CID, and names/SMILES must first be resolved with pubchem_search_compounds. It does not, however, state when to prefer this over pubchem_get_compound_details or what it excludes, so it stops short of explicit when/when-not guidance.

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