Skip to main content
Glama

Search Compounds

pubchem_search_compounds
Read-onlyIdempotent

Search PubChem for chemical compounds by name, SMILES, InChI, formula, structure, similarity, bioassay, or mass range; returns CIDs with optional properties.

Instructions

Search PubChem for chemical compounds by identifier (name, SMILES, InChI, or InChIKey, up to 25 per call), molecular formula in Hill notation, substructure or superstructure containment, 2D Tanimoto similarity, the compounds a bioassay (AID) found active or tested, or an accurate mass or molecular weight range. Returns a page of CIDs, each similarity hit with its Tanimoto score — reach matches past maxResults with offset. Optionally hydrate results with properties to avoid a follow-up pubchem_get_compound_details call.

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": {
      "searchType": "<searchType>"
    },
    "name": "pubchem_search_compounds"
  }
}

Input Schema

NameRequiredDescriptionDefault
aidNoRequired for assay search. PubChem Assay ID (AID) whose compounds to list, from 1 to 2147483647, e.g. 1000. Find AIDs for a biological target with pubchem_search_assays. For one listed compound's outcome and activity values in this assay, call pubchem_get_bioactivity with its cid and aid: [this AID].
queryNoRequired for substructure/superstructure/similarity searches. A SMILES string (e.g. "CC(=O)O") or PubChem CID as a string from 1 to 2147483647 (e.g. "2244").
offsetNoZero-based index of the first CID to return. Pass the nextOffset from a previous call to read the following page. Identifier lookups resolve every match up front, so paging them is free, and assay and mass searches fetch only the requested page, so all three page to the end of their matches; a mass search reaches the first 1000000, the most PubChem counts. Formula, substructure, superstructure, and similarity searches have to ask PubChem for offset + maxResults records to reach a page, so deep pages cost progressively more upstream: those four accept an offset up to 10000. Default: 0.
formulaNoRequired for formula search. Molecular formula in Hill notation (e.g. "C6H12O6", "CaH2O2").
massMaxNoRequired for mass search. Upper bound of the mass window, inclusive, in daltons (g/mol for molecular_weight). E.g. 180.064. Search a measured mass with a window around it at the measurement's tolerance: PubChem compares the window with the value it stores for each compound, so a massMax equal to massMin matches only compounds whose stored value equals it to every stored decimal. PubChem counts at most 1000000 matches in a window and can time out on one hundreds of Da wide; narrow the window if either happens.
massMinNoRequired for mass search. Lower bound of the mass window, inclusive, in daltons (g/mol for molecular_weight): 0 or more, and no greater than massMax. E.g. 180.063.
massTypeNoRequired for mass search. The mass that massMin and massMax bound: "monoisotopic_mass" (from each element's most abundant isotope; the usual high-resolution MS target), "exact_mass" (the most likely isotopic composition, which gives the most intense peak; differs from monoisotopic_mass for compounds rich in Cl or Br and for molecules of about 90 or more carbons), or "molecular_weight" (isotope-averaged, in g/mol).
queryTypeNoRequired for structure/similarity searches. Format of the query: "smiles" or "cid".
thresholdNoSimilarity search only. Minimum Tanimoto similarity (70-100). 90+ for close analogs, 70-80 for scaffold hops. Hits come in PubChem's order, not ranked by score, so raising threshold is how to narrow a page to closer analogs. 100 means a fingerprint identical to the query's, not an identical compound: isotopologues and some positional isomers match at 100. Default: 90.
activeOnlyNoAssay search only. When true (default), lists only the compounds the assay marked active; false lists every compound it tested.
maxResultsNoMaximum CIDs to return per page. The per-call cap is 200: a larger value (up to 1000) returns a page of 200 and is reported in cappedInputs. Use offset to reach matches past this page. Default: 20.
propertiesNoOptional: fetch these properties for each result, avoiding a follow-up details call. E.g. ["MolecularFormula", "MolecularWeight", "CanonicalSMILES"].
searchTypeYesSearch strategy; each mode needs its own fields. "identifier": name/SMILES/InChI/InChIKey lookup — requires identifierType and identifiers. "formula": molecular formula — requires formula. "substructure": find compounds containing the query as a substructure. "superstructure": find compounds that are themselves substructures of the query. "similarity": 2D Tanimoto similarity to the query, each hit with its score — hits come in PubChem's order, not ranked by score, so raise threshold to narrow to closer analogs. substructure, superstructure, and similarity require query and queryType. "assay": compounds tested in a PubChem bioassay — requires aid; activeOnly (default true) keeps only the compounds the assay marked active. "mass": compounds whose monoisotopic mass, exact mass, or molecular weight lies in an inclusive range — requires massType, massMin, and massMax; matches come in PubChem's order, not ranked by closeness to a target mass.
identifiersNoRequired for identifier search. Array of identifiers to resolve. 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. Examples: ["aspirin", "ibuprofen"] for name, ["CC(=O)OC1=CC=CC=C1C(=O)O"] for SMILES, ["InChI=1S/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12)"] for inchi (sent exactly as written, case kept), ["BSYNRYMUTXBXSQ-UHFFFAOYSA-N"] for inchikey (27-char block format; uppercased before lookup, any case accepted).
identifierTypeNoRequired for identifier search. Type of chemical identifier: "name", "smiles", "inchi" (a full InChI string, case-sensitive), or "inchikey".
allowOtherElementsNoFormula search only. When true, includes compounds with additional elements beyond the formula.

Output Schema

NameRequiredDescriptionDefault
capNoThe page size applied: maxResults, or the per-call cap when maxResults exceeds it.
errorNoPresent when the call failed. Absent on success.
shownNoCIDs returned on this page.
noticeNoRecovery guidance when no compounds matched (for an assay search, when the assay recorded none of the requested kind; for a mass search, naming the mass type and window; for a substructure, superstructure, or similarity search on a query CID, saying when PubChem marks that CID non-live and naming the CID it prefers in its place), when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, when PubChem did not return the live status or preferred CID of an identifier-mode row, when further pages remain, when a bounded search reached the offset ceiling, when a mass search reached the most matches PubChem counts, or when a similarity page carries no scores, saying why. Absent when this page is complete, every identifier resolved to its own CID with its status read, and a similarity page carries its scores.
offsetNoZero-based index of the first CID returned.
resultsNoMatching compounds.
truncatedNoTrue when matching CIDs remain past this page.
activeOnlyNoAssay search only: true when the list holds only the compounds the assay marked active, false when it holds every compound tested.
nextOffsetNoOffset to pass on the next call to continue past this page. Omitted when no further matches remain; when a formula, substructure, superstructure, or similarity page would continue past the 10000 offset ceiling (truncated stays true, and the notice says how to narrow the search and names the page at offset 10000 when it still reaches further matches); and when a mass search page reaches the last of the 1000000 matches PubChem counts (truncated stays true, and the notice says how to narrow the window).
searchTypeNoSearch strategy used: identifier, formula, substructure, superstructure, similarity, assay, or mass.
totalFoundNoExact number of matching CIDs across all pages. Omitted when a formula, substructure, superstructure, or similarity search saturated the records it requested — PubChem returns no match count for those — and when a mass search reached the 1000000 matches PubChem counts at most; totalFoundAtLeast reports a floor instead.
unprocessedNoIdentifier-mode only: identifiers past the per-call cap of 25, in input order, not looked up. Pass them in a follow-up call. Omitted when every identifier 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.
totalFoundAtLeastNoLower bound on matching CIDs, reported in place of totalFound when the exact count is unavailable. At least this many match, and the true total may be higher. A formula or structure search shows more by paging further with offset; a mass search pages only this many, and a narrower window reaches the rest.
unresolvedIdentifiersNoIdentifier-mode only: input identifiers that resolved to no CID — PubChem had no match, or could not interpret the input as identifierType (the notice says which). Omitted when every identifier resolved and for non-identifier searches.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.9.1
    • changedInput schema / properties / aid / description
      Previous value: -"Required for assay search. PubChem Assay ID (AID) whose compounds to list, from 1 to 2147483647, e.g. 1000. Find AIDs for a biological target with pubchem_search_assays."New value: +"Required for assay search. PubChem Assay ID (AID) whose compounds to list, from 1 to 2147483647, e.g. 1000. Find AIDs for a biological target with pubchem_search_assays. For one listed compound's outcome and activity values in this assay, call pubchem_get_bioactivity with its cid and aid: [this AID]."
    • changedInput schema / properties / massMax / description
      Previous value: -"Required for mass search. Upper bound of the mass window, inclusive, in daltons (g/mol for molecular_weight); equal to massMin for one exact value. E.g. 180.064. PubChem counts at most 1000000 matches in a window and can time out on one hundreds of Da wide; narrow the window if either happens."New value: +"Required for mass search. Upper bound of the mass window, inclusive, in daltons (g/mol for molecular_weight). E.g. 180.064. Search a measured mass with a window around it at the measurement's tolerance: PubChem compares the window with the value it stores for each compound, so a massMax equal to massMin matches only compounds whose stored value equals it to every stored decimal. PubChem counts at most 1000000 matches in a window and can time out on one hundreds of Da wide; narrow the window if either happens."
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery guidance when no compounds matched (for an assay search, when the assay recorded none of the requested kind; for a mass search, naming the mass type and window), when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, when further pages remain, when a bounded search reached the offset ceiling, when a mass search reached the most matches PubChem counts, or when a similarity page carries no scores, saying why. Absent when this page is complete, every identifier resolved to its own CID, and a similarity page carries its scores."New value: +"Recovery guidance when no compounds matched (for an assay search, when the assay recorded none of the requested kind; for a mass search, naming the mass type and window; for a substructure, superstructure, or similarity search on a query CID, saying when PubChem marks that CID non-live and naming the CID it prefers in its place), when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, when PubChem did not return the live status or preferred CID of an identifier-mode row, when further pages remain, when a bounded search reached the offset ceiling, when a mass search reached the most matches PubChem counts, or when a similarity page carries no scores, saying why. Absent when this page is complete, every identifier resolved to its own CID with its status read, and a similarity page carries its scores."
    • addedOutput schema / properties / results / items / properties / live
      Added value: +{
      +  "description": "Identifier mode only: false when PubChem marks the CID non-live — no live substance links to it any more, though its record remains, and a name, SMILES, InChI, or InChIKey lookup can still return it — and true otherwise. A non-live CID is often superseded: preferredCid names the CID PubChem prefers in its place. Absent when PubChem did not return the status (the notice names those CIDs).",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / results / items / properties / preferredCid
      Added value: +{
      +  "description": "Identifier mode, non-live CIDs only: the CID PubChem prefers in place of this one, its current record for the compound. Absent when PubChem names no other CID, or did not return it (the notice says so).",
      +  "type": "number"
      +}
  2. Changed15 schema fields changedv0.9.0
    • addedInput schema / properties / massMax
      Added value: +{
      +  "description": "Required for mass search. Upper bound of the mass window, inclusive, in daltons (g/mol for molecular_weight); equal to massMin for one exact value. E.g. 180.064. PubChem counts at most 1000000 matches in a window and can time out on one hundreds of Da wide; narrow the window if either happens.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / massMin
      Added value: +{
      +  "description": "Required for mass search. Lower bound of the mass window, inclusive, in daltons (g/mol for molecular_weight): 0 or more, and no greater than massMax. E.g. 180.063.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / massType
      Added value: +{
      +  "description": "Required for mass search. The mass that massMin and massMax bound: \"monoisotopic_mass\" (from each element's most abundant isotope; the usual high-resolution MS target), \"exact_mass\" (the most likely isotopic composition, which gives the most intense peak; differs from monoisotopic_mass for compounds rich in Cl or Br and for molecules of about 90 or more carbons), or \"molecular_weight\" (isotope-averaged, in g/mol).",
      +  "enum": [
      +    "monoisotopic_mass",
      +    "exact_mass",
      +    "molecular_weight"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / offset / description
      Previous value: -"Zero-based index of the first CID to return. Pass the nextOffset from a previous call to read the following page. Identifier lookups resolve every match up front, so paging them is free, and assay searches fetch only the requested page, so both page to the end of their matches. Formula, substructure, superstructure, and similarity searches have to ask PubChem for offset + maxResults records to reach a page, so deep pages cost progressively more upstream: those four accept an offset up to 10000. Default: 0."New value: +"Zero-based index of the first CID to return. Pass the nextOffset from a previous call to read the following page. Identifier lookups resolve every match up front, so paging them is free, and assay and mass searches fetch only the requested page, so all three page to the end of their matches; a mass search reaches the first 1000000, the most PubChem counts. Formula, substructure, superstructure, and similarity searches have to ask PubChem for offset + maxResults records to reach a page, so deep pages cost progressively more upstream: those four accept an offset up to 10000. Default: 0."
    • changedInput schema / properties / searchType / description
      Previous value: -"Search strategy; each mode needs its own fields. \"identifier\": name/SMILES/InChI/InChIKey lookup — requires identifierType and identifiers. \"formula\": molecular formula — requires formula. \"substructure\": find compounds containing the query as a substructure. \"superstructure\": find compounds that are themselves substructures of the query. \"similarity\": 2D Tanimoto similarity to the query. substructure, superstructure, and similarity require query and queryType. \"assay\": compounds tested in a PubChem bioassay — requires aid; activeOnly (default true) keeps only the compounds the assay marked active."New value: +"Search strategy; each mode needs its own fields. \"identifier\": name/SMILES/InChI/InChIKey lookup — requires identifierType and identifiers. \"formula\": molecular formula — requires formula. \"substructure\": find compounds containing the query as a substructure. \"superstructure\": find compounds that are themselves substructures of the query. \"similarity\": 2D Tanimoto similarity to the query, each hit with its score — hits come in PubChem's order, not ranked by score, so raise threshold to narrow to closer analogs. substructure, superstructure, and similarity require query and queryType. \"assay\": compounds tested in a PubChem bioassay — requires aid; activeOnly (default true) keeps only the compounds the assay marked active. \"mass\": compounds whose monoisotopic mass, exact mass, or molecular weight lies in an inclusive range — requires massType, massMin, and massMax; matches come in PubChem's order, not ranked by closeness to a target mass."
    • changedInput schema / properties / searchType / enum
      Previous value: -[
      -  "identifier",
      -  "formula",
      -  "substructure",
      -  "superstructure",
      -  "similarity",
      -  "assay"
      -]New value: +[
      +  "identifier",
      +  "formula",
      +  "substructure",
      +  "superstructure",
      +  "similarity",
      +  "assay",
      +  "mass"
      +]
    • changedInput schema / properties / threshold / description
      Previous value: -"Similarity search only. Minimum Tanimoto similarity (70-100). 90+ for close analogs, 70-80 for scaffold hops. Default: 90."New value: +"Similarity search only. Minimum Tanimoto similarity (70-100). 90+ for close analogs, 70-80 for scaffold hops. Hits come in PubChem's order, not ranked by score, so raising threshold is how to narrow a page to closer analogs. 100 means a fingerprint identical to the query's, not an identical compound: isotopologues and some positional isomers match at 100. Default: 90."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted or blank. `missing_structure_args`: substructure/superstructure/similarity search with query or queryType omitted, or a blank query. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not an integer CID from 1 to 2147483647. `offset_ceiling_exceeded`: formula, substructure, superstructure, or similarity search with offset above 10000. `missing_aid`: searchType is \"assay\" but aid was omitted. `aid_not_found`: assay search where PubChem has no live assay with the given AID. `identifier_rejected`: identifier search where PubChem rejected every identifier in the batch as unreadable (HTTP 400) — for SMILES or InChI, a string it could not standardize into a structure. A batch with any other outcome lists rejected inputs in unresolvedIdentifiers instead. `search_query_rejected`: PubChem failed a formula, substructure, superstructure, or similarity search with HTTP 500 \"Search status indicates failure\" — its answer for a malformed SMILES or formula, a SMILES with a \"*\" wildcard atom, or a CID with no record — or refused any of these searches with HTTP 400, as it does a formula carrying a line break, another C0 control character other than tab and NUL, or DEL. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted or blank. `missing_structure_args`: substructure/superstructure/similarity search with query or queryType omitted, or a blank query. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not an integer CID from 1 to 2147483647. `offset_ceiling_exceeded`: formula, substructure, superstructure, or similarity search with offset above 10000. `missing_aid`: searchType is \"assay\" but aid was omitted. `aid_not_found`: assay search where PubChem has no live assay with the given AID. `missing_mass_args`: searchType is \"mass\" but massType, massMin, or massMax was omitted. `inverted_mass_window`: mass search with massMin greater than massMax. `mass_search_timeout`: mass search PubChem did not finish in time — HTTP 504 PUGREST.Timeout, or no answer within the call time limit — as happens for a window hundreds of Da wide. `identifier_rejected`: identifier search where PubChem rejected every identifier in the batch as unreadable (HTTP 400) — for SMILES or InChI, a string it could not standardize into a structure. A batch with any other outcome lists rejected inputs in unresolvedIdentifiers instead. `search_query_rejected`: PubChem failed a formula, substructure, superstructure, or similarity search with HTTP 500 \"Search status indicates failure\" — its answer for a malformed SMILES or formula, a SMILES with a \"*\" wildcard atom, or a CID with no record — or refused any of these searches with HTTP 400, as it does a formula carrying a line break, another C0 control character other than tab and NUL, or DEL. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "missing_identifier_args",
      -  "missing_formula",
      -  "missing_structure_args",
      -  "invalid_cid_query",
      -  "offset_ceiling_exceeded",
      -  "missing_aid",
      -  "aid_not_found",
      -  "identifier_rejected",
      -  "search_query_rejected"
      -]New value: +[
      +  "missing_identifier_args",
      +  "missing_formula",
      +  "missing_structure_args",
      +  "invalid_cid_query",
      +  "offset_ceiling_exceeded",
      +  "missing_aid",
      +  "aid_not_found",
      +  "missing_mass_args",
      +  "inverted_mass_window",
      +  "mass_search_timeout",
      +  "identifier_rejected",
      +  "search_query_rejected"
      +]
    • changedOutput schema / properties / nextOffset / description
      Previous value: -"Offset to pass on the next call to continue past this page. Omitted when no further matches remain, and when a formula, substructure, superstructure, or similarity page would continue past the 10000 offset ceiling (truncated stays true, and the notice says how to narrow the search and names the page at offset 10000 when it still reaches further matches)."New value: +"Offset to pass on the next call to continue past this page. Omitted when no further matches remain; when a formula, substructure, superstructure, or similarity page would continue past the 10000 offset ceiling (truncated stays true, and the notice says how to narrow the search and names the page at offset 10000 when it still reaches further matches); and when a mass search page reaches the last of the 1000000 matches PubChem counts (truncated stays true, and the notice says how to narrow the window)."
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery guidance when no compounds matched (for an assay search, when the assay recorded none of the requested kind), when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, when further pages remain, or when a bounded search reached the offset ceiling. Absent when this page is complete and every identifier resolved to its own CID."New value: +"Recovery guidance when no compounds matched (for an assay search, when the assay recorded none of the requested kind; for a mass search, naming the mass type and window), when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, when further pages remain, when a bounded search reached the offset ceiling, when a mass search reached the most matches PubChem counts, or when a similarity page carries no scores, saying why. Absent when this page is complete, every identifier resolved to its own CID, and a similarity page carries its scores."
    • addedOutput schema / properties / results / items / properties / similarity
      Added value: +{
      +  "description": "Similarity search only: this hit's Tanimoto similarity to the query, from 0 to 1, rounded to three decimals, computed from PubChem's 881-bit substructure fingerprint (Fingerprint2D), the one its threshold applies to. 1 means a fingerprint identical to the query's, not an identical compound: isotopologues and some positional isomers of the query score 1. Absent when PubChem returned no fingerprint for this hit, and on every hit when it returned none for the query or the fingerprint lookup failed (the notice says which).",
      +  "type": "number"
      +}
    • changedOutput schema / properties / searchType / description
      Previous value: -"Search strategy used: identifier, formula, substructure, superstructure, similarity, or assay."New value: +"Search strategy used: identifier, formula, substructure, superstructure, similarity, assay, or mass."
    • changedOutput schema / properties / totalFound / description
      Previous value: -"Exact number of matching CIDs across all pages. Omitted when a formula, substructure, superstructure, or similarity search saturated the records it requested — PubChem returns no match count for those, so totalFoundAtLeast reports a floor instead."New value: +"Exact number of matching CIDs across all pages. Omitted when a formula, substructure, superstructure, or similarity search saturated the records it requested — PubChem returns no match count for those — and when a mass search reached the 1000000 matches PubChem counts at most; totalFoundAtLeast reports a floor instead."
    • changedOutput schema / properties / totalFoundAtLeast / description
      Previous value: -"Lower bound on matching CIDs, reported in place of totalFound when the exact count is unavailable. At least this many match, and the true total may be higher; page further with offset to observe more."New value: +"Lower bound on matching CIDs, reported in place of totalFound when the exact count is unavailable. At least this many match, and the true total may be higher. A formula or structure search shows more by paging further with offset; a mass search pages only this many, and a narrower window reaches the rest."
  3. Changed1 schema field changedv0.8.1
    • changedOutput schema / properties / results / items / properties / properties / description
      Previous value: -"Compound properties keyed by name (echoes input.properties; only present when requested)."New value: +"Compound properties keyed by name (echoes input.properties; only present when requested). A property requested under its current PubChem name is keyed by the older one: SMILES as IsomericSMILES, ConnectivitySMILES as CanonicalSMILES."
  4. Changed1 schema field changedv0.8.0
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted or blank. `missing_structure_args`: substructure/superstructure/similarity search with query or queryType omitted, or a blank query. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not an integer CID from 1 to 2147483647. `offset_ceiling_exceeded`: formula, substructure, superstructure, or similarity search with offset above 10000. `missing_aid`: searchType is \"assay\" but aid was omitted. `aid_not_found`: assay search where PubChem has no live assay with the given AID. `identifier_rejected`: identifier search where PubChem rejected every identifier in the batch as unreadable (HTTP 400) — for SMILES or InChI, a string it could not standardize into a structure. A batch with any other outcome lists rejected inputs in unresolvedIdentifiers instead. `search_query_rejected`: PubChem failed a formula, substructure, superstructure, or similarity search with HTTP 500 \"Search status indicates failure\" — its answer for a malformed SMILES or formula, a SMILES with a \"*\" wildcard atom, or a CID with no record. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted or blank. `missing_structure_args`: substructure/superstructure/similarity search with query or queryType omitted, or a blank query. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not an integer CID from 1 to 2147483647. `offset_ceiling_exceeded`: formula, substructure, superstructure, or similarity search with offset above 10000. `missing_aid`: searchType is \"assay\" but aid was omitted. `aid_not_found`: assay search where PubChem has no live assay with the given AID. `identifier_rejected`: identifier search where PubChem rejected every identifier in the batch as unreadable (HTTP 400) — for SMILES or InChI, a string it could not standardize into a structure. A batch with any other outcome lists rejected inputs in unresolvedIdentifiers instead. `search_query_rejected`: PubChem failed a formula, substructure, superstructure, or similarity search with HTTP 500 \"Search status indicates failure\" — its answer for a malformed SMILES or formula, a SMILES with a \"*\" wildcard atom, or a CID with no record — or refused any of these searches with HTTP 400, as it does a formula carrying a line break, another C0 control character other than tab and NUL, or DEL. Other values are possible when a failure originates below the handler."
  5. Changed10 schema fields changedv0.7.1
    • changedInput schema / properties / identifierType / description
      Previous value: -"Required for identifier search. Type of chemical identifier: \"name\", \"smiles\", or \"inchikey\"."New value: +"Required for identifier search. Type of chemical identifier: \"name\", \"smiles\", \"inchi\" (a full InChI string, case-sensitive), or \"inchikey\"."
    • changedInput schema / properties / identifierType / enum
      Previous value: -[
      -  "name",
      -  "smiles",
      -  "inchikey"
      -]New value: +[
      +  "name",
      +  "smiles",
      +  "inchi",
      +  "inchikey"
      +]
    • changedInput schema / properties / identifiers / description
      Previous value: -"Required for identifier search. Array of identifiers to resolve. 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. Examples: [\"aspirin\", \"ibuprofen\"] for name, [\"CC(=O)OC1=CC=CC=C1C(=O)O\"] for SMILES, [\"BSYNRYMUTXBXSQ-UHFFFAOYSA-N\"] for inchikey (27-char block format; uppercased before lookup, any case accepted)."New value: +"Required for identifier search. Array of identifiers to resolve. 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. Examples: [\"aspirin\", \"ibuprofen\"] for name, [\"CC(=O)OC1=CC=CC=C1C(=O)O\"] for SMILES, [\"InChI=1S/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12)\"] for inchi (sent exactly as written, case kept), [\"BSYNRYMUTXBXSQ-UHFFFAOYSA-N\"] for inchikey (27-char block format; uppercased before lookup, any case accepted)."
    • changedInput schema / properties / offset / description
      Previous value: -"Zero-based index of the first CID to return. Pass the nextOffset from a previous call to read the following page. Identifier lookups resolve every match up front, so paging them is free, and assay searches fetch only the requested page; formula, substructure, superstructure, and similarity searches have to ask PubChem for offset + maxResults records to reach a page, so deep pages cost progressively more upstream — hence the 10000 ceiling. Default: 0."New value: +"Zero-based index of the first CID to return. Pass the nextOffset from a previous call to read the following page. Identifier lookups resolve every match up front, so paging them is free, and assay searches fetch only the requested page, so both page to the end of their matches. Formula, substructure, superstructure, and similarity searches have to ask PubChem for offset + maxResults records to reach a page, so deep pages cost progressively more upstream: those four accept an offset up to 10000. Default: 0."
    • changedInput schema / properties / offset / maximum
      Previous value: -10000New value: +9007199254740991
    • changedInput schema / properties / searchType / description
      Previous value: -"Search strategy; each mode needs its own fields. \"identifier\": name/SMILES/InChIKey lookup — requires identifierType and identifiers. \"formula\": molecular formula — requires formula. \"substructure\": find compounds containing the query as a substructure. \"superstructure\": find compounds that are themselves substructures of the query. \"similarity\": 2D Tanimoto similarity to the query. substructure, superstructure, and similarity require query and queryType. \"assay\": compounds tested in a PubChem bioassay — requires aid; activeOnly (default true) keeps only the compounds the assay marked active."New value: +"Search strategy; each mode needs its own fields. \"identifier\": name/SMILES/InChI/InChIKey lookup — requires identifierType and identifiers. \"formula\": molecular formula — requires formula. \"substructure\": find compounds containing the query as a substructure. \"superstructure\": find compounds that are themselves substructures of the query. \"similarity\": 2D Tanimoto similarity to the query. substructure, superstructure, and similarity require query and queryType. \"assay\": compounds tested in a PubChem bioassay — requires aid; activeOnly (default true) keeps only the compounds the assay marked active."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted or blank. `missing_structure_args`: substructure/superstructure/similarity search with query or queryType omitted, or a blank query. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not an integer CID from 1 to 2147483647. `missing_aid`: searchType is \"assay\" but aid was omitted. `aid_not_found`: assay search where PubChem has no live assay with the given AID. `identifier_rejected`: identifier search where PubChem rejected every identifier in the batch as unreadable (HTTP 400) — for SMILES, a string it could not standardize into a structure. A batch with any other outcome lists rejected inputs in unresolvedIdentifiers instead. `search_query_rejected`: PubChem failed a formula, substructure, superstructure, or similarity search with HTTP 500 \"Search status indicates failure\" — its answer for a malformed SMILES or formula, a SMILES with a \"*\" wildcard atom, or a CID with no record. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted or blank. `missing_structure_args`: substructure/superstructure/similarity search with query or queryType omitted, or a blank query. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not an integer CID from 1 to 2147483647. `offset_ceiling_exceeded`: formula, substructure, superstructure, or similarity search with offset above 10000. `missing_aid`: searchType is \"assay\" but aid was omitted. `aid_not_found`: assay search where PubChem has no live assay with the given AID. `identifier_rejected`: identifier search where PubChem rejected every identifier in the batch as unreadable (HTTP 400) — for SMILES or InChI, a string it could not standardize into a structure. A batch with any other outcome lists rejected inputs in unresolvedIdentifiers instead. `search_query_rejected`: PubChem failed a formula, substructure, superstructure, or similarity search with HTTP 500 \"Search status indicates failure\" — its answer for a malformed SMILES or formula, a SMILES with a \"*\" wildcard atom, or a CID with no record. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "missing_identifier_args",
      -  "missing_formula",
      -  "missing_structure_args",
      -  "invalid_cid_query",
      -  "missing_aid",
      -  "aid_not_found",
      -  "identifier_rejected",
      -  "search_query_rejected"
      -]New value: +[
      +  "missing_identifier_args",
      +  "missing_formula",
      +  "missing_structure_args",
      +  "invalid_cid_query",
      +  "offset_ceiling_exceeded",
      +  "missing_aid",
      +  "aid_not_found",
      +  "identifier_rejected",
      +  "search_query_rejected"
      +]
    • changedOutput schema / properties / nextOffset / description
      Previous value: -"Offset to pass on the next call to continue past this page. Omitted when no further matches remain."New value: +"Offset to pass on the next call to continue past this page. Omitted when no further matches remain, and when a formula, substructure, superstructure, or similarity page would continue past the 10000 offset ceiling (truncated stays true, and the notice says how to narrow the search and names the page at offset 10000 when it still reaches further matches)."
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery guidance when no compounds matched (for an assay search, when the assay recorded none of the requested kind), when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, or when further pages remain. Absent when this page is complete and every identifier resolved to its own CID."New value: +"Recovery guidance when no compounds matched (for an assay search, when the assay recorded none of the requested kind), when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, when further pages remain, or when a bounded search reached the offset ceiling. Absent when this page is complete and every identifier resolved to its own CID."
  6. Changed18 schema fields changedv0.7.0
    • addedInput schema / properties / activeOnly
      Added value: +{
      +  "default": true,
      +  "description": "Assay search only. When true (default), lists only the compounds the assay marked active; false lists every compound it tested.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / aid
      Added value: +{
      +  "description": "Required for assay search. PubChem Assay ID (AID) whose compounds to list, from 1 to 2147483647, e.g. 1000. Find AIDs for a biological target with pubchem_search_assays.",
      +  "maximum": 2147483647,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / identifiers / description
      Previous value: -"Required for identifier search. Array of identifiers to resolve (1-25). Examples: [\"aspirin\", \"ibuprofen\"] for name, [\"CC(=O)OC1=CC=CC=C1C(=O)O\"] for SMILES, [\"BSYNRYMUTXBXSQ-UHFFFAOYSA-N\"] for inchikey (27-char block format)."New value: +"Required for identifier search. Array of identifiers to resolve. 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. Examples: [\"aspirin\", \"ibuprofen\"] for name, [\"CC(=O)OC1=CC=CC=C1C(=O)O\"] for SMILES, [\"BSYNRYMUTXBXSQ-UHFFFAOYSA-N\"] for inchikey (27-char block format; uppercased before lookup, any case accepted)."
    • changedInput schema / properties / identifiers / maxItems
      Previous value: -25New value: +1000
    • changedInput schema / properties / maxResults / description
      Previous value: -"Maximum CIDs to return per page (1-200). Use offset to reach matches past this page. Default: 20."New value: +"Maximum CIDs to return per page. The per-call cap is 200: a larger value (up to 1000) returns a page of 200 and is reported in cappedInputs. Use offset to reach matches past this page. Default: 20."
    • changedInput schema / properties / maxResults / maximum
      Previous value: -200New value: +1000
    • changedInput schema / properties / offset / description
      Previous value: -"Zero-based index of the first CID to return. Pass the nextOffset from a previous call to read the following page. Identifier lookups resolve every match up front, so paging them is free; formula, substructure, superstructure, and similarity searches have to ask PubChem for offset + maxResults records to reach a page, so deep pages cost progressively more upstream — hence the 10000 ceiling. Default: 0."New value: +"Zero-based index of the first CID to return. Pass the nextOffset from a previous call to read the following page. Identifier lookups resolve every match up front, so paging them is free, and assay searches fetch only the requested page; formula, substructure, superstructure, and similarity searches have to ask PubChem for offset + maxResults records to reach a page, so deep pages cost progressively more upstream — hence the 10000 ceiling. Default: 0."
    • changedInput schema / properties / query / description
      Previous value: -"Required for substructure/superstructure/similarity searches. A SMILES string (e.g. \"CC(=O)O\") or PubChem CID as a string (e.g. \"2244\")."New value: +"Required for substructure/superstructure/similarity searches. A SMILES string (e.g. \"CC(=O)O\") or PubChem CID as a string from 1 to 2147483647 (e.g. \"2244\")."
    • changedInput schema / properties / searchType / description
      Previous value: -"Search strategy; each mode needs its own fields. \"identifier\": name/SMILES/InChIKey lookup — requires identifierType and identifiers. \"formula\": molecular formula — requires formula. \"substructure\": find compounds containing the query as a substructure. \"superstructure\": find compounds that are themselves substructures of the query. \"similarity\": 2D Tanimoto similarity to the query. substructure, superstructure, and similarity require query and queryType."New value: +"Search strategy; each mode needs its own fields. \"identifier\": name/SMILES/InChIKey lookup — requires identifierType and identifiers. \"formula\": molecular formula — requires formula. \"substructure\": find compounds containing the query as a substructure. \"superstructure\": find compounds that are themselves substructures of the query. \"similarity\": 2D Tanimoto similarity to the query. substructure, superstructure, and similarity require query and queryType. \"assay\": compounds tested in a PubChem bioassay — requires aid; activeOnly (default true) keeps only the compounds the assay marked active."
    • changedInput schema / properties / searchType / enum
      Previous value: -[
      -  "identifier",
      -  "formula",
      -  "substructure",
      -  "superstructure",
      -  "similarity"
      -]New value: +[
      +  "identifier",
      +  "formula",
      +  "substructure",
      +  "superstructure",
      +  "similarity",
      +  "assay"
      +]
    • addedOutput schema / properties / activeOnly
      Added value: +{
      +  "description": "Assay search only: true when the list holds only the compounds the assay marked active, false when it holds every compound tested.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / cap / description
      Previous value: -"The maxResults cap that was applied."New value: +"The page size applied: maxResults, or the per-call cap when maxResults exceeds it."
    • 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 / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted or blank. `missing_structure_args`: substructure/superstructure/similarity search with query or queryType omitted, or a blank query. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not a positive integer CID. `identifier_rejected`: identifier search where PubChem rejected every identifier in the batch as unreadable (HTTP 400) — for SMILES, a string it could not standardize into a structure. A batch with any other outcome lists rejected inputs in unresolvedIdentifiers instead. `search_query_rejected`: PubChem failed a formula, substructure, superstructure, or similarity search with HTTP 500 \"Search status indicates failure\" — its answer for a malformed SMILES or formula, a SMILES with a \"*\" wildcard atom, or a CID with no record. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted or blank. `missing_structure_args`: substructure/superstructure/similarity search with query or queryType omitted, or a blank query. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not an integer CID from 1 to 2147483647. `missing_aid`: searchType is \"assay\" but aid was omitted. `aid_not_found`: assay search where PubChem has no live assay with the given AID. `identifier_rejected`: identifier search where PubChem rejected every identifier in the batch as unreadable (HTTP 400) — for SMILES, a string it could not standardize into a structure. A batch with any other outcome lists rejected inputs in unresolvedIdentifiers instead. `search_query_rejected`: PubChem failed a formula, substructure, superstructure, or similarity search with HTTP 500 \"Search status indicates failure\" — its answer for a malformed SMILES or formula, a SMILES with a \"*\" wildcard atom, or a CID with no record. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "missing_identifier_args",
      -  "missing_formula",
      -  "missing_structure_args",
      -  "invalid_cid_query",
      -  "identifier_rejected",
      -  "search_query_rejected"
      -]New value: +[
      +  "missing_identifier_args",
      +  "missing_formula",
      +  "missing_structure_args",
      +  "invalid_cid_query",
      +  "missing_aid",
      +  "aid_not_found",
      +  "identifier_rejected",
      +  "search_query_rejected"
      +]
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery guidance when no compounds matched, when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, or when further pages remain. Absent when this page is complete and every identifier resolved to its own CID."New value: +"Recovery guidance when no compounds matched (for an assay search, when the assay recorded none of the requested kind), when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, or when further pages remain. Absent when this page is complete and every identifier resolved to its own CID."
    • changedOutput schema / properties / searchType / description
      Previous value: -"Search strategy used: identifier, formula, substructure, superstructure, or similarity."New value: +"Search strategy used: identifier, formula, substructure, superstructure, similarity, or assay."
    • addedOutput schema / properties / unprocessed
      Added value: +{
      +  "description": "Identifier-mode only: identifiers past the per-call cap of 25, in input order, not looked up. Pass them in a follow-up call. Omitted when every identifier was looked up.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  7. Changed5 schema fields changedv0.6.5
    • changedInput schema / properties / searchType / description
      Previous value: -"Search strategy. \"identifier\": name/SMILES/InChIKey lookup. \"formula\": molecular formula. \"substructure\": find compounds containing the query as a substructure. \"superstructure\": find compounds that are themselves substructures of the query. \"similarity\": 2D Tanimoto similarity to the query."New value: +"Search strategy; each mode needs its own fields. \"identifier\": name/SMILES/InChIKey lookup — requires identifierType and identifiers. \"formula\": molecular formula — requires formula. \"substructure\": find compounds containing the query as a substructure. \"superstructure\": find compounds that are themselves substructures of the query. \"similarity\": 2D Tanimoto similarity to the query. substructure, superstructure, and similarity require query and queryType."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted. `missing_structure_args`: substructure/superstructure/similarity search missing query or queryType. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not a positive integer CID. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted or blank. `missing_structure_args`: substructure/superstructure/similarity search with query or queryType omitted, or a blank query. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not a positive integer CID. `identifier_rejected`: identifier search where PubChem rejected every identifier in the batch as unreadable (HTTP 400) — for SMILES, a string it could not standardize into a structure. A batch with any other outcome lists rejected inputs in unresolvedIdentifiers instead. `search_query_rejected`: PubChem failed a formula, substructure, superstructure, or similarity search with HTTP 500 \"Search status indicates failure\" — its answer for a malformed SMILES or formula, a SMILES with a \"*\" wildcard atom, or a CID with no record. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "missing_identifier_args",
      -  "missing_formula",
      -  "missing_structure_args",
      -  "invalid_cid_query"
      -]New value: +[
      +  "missing_identifier_args",
      +  "missing_formula",
      +  "missing_structure_args",
      +  "invalid_cid_query",
      +  "identifier_rejected",
      +  "search_query_rejected"
      +]
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery guidance when no compounds matched, when the offset runs past the matches observed, when identifiers failed to resolve, or when further pages remain. Absent when this page is complete and every identifier resolved."New value: +"Recovery guidance when no compounds matched, when the offset runs past the matches observed, when identifiers had no match or could not be interpreted, when identifiers collided on one CID, or when further pages remain. Absent when this page is complete and every identifier resolved to its own CID."
    • changedOutput schema / properties / unresolvedIdentifiers / description
      Previous value: -"Identifier-mode only: input identifiers that resolved to no CID. Omitted when every identifier resolved and for non-identifier searches."New value: +"Identifier-mode only: input identifiers that resolved to no CID — PubChem had no match, or could not interpret the input as identifierType (the notice says which). Omitted when every identifier resolved and for non-identifier searches."
  8. Changed1 schema field changedv0.6.3
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted `missing_formula`: searchType is \"formula\" but the formula field was omitted `missing_structure_args`: substructure/superstructure/similarity search missing query or queryType `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not a positive integer CID Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted. `missing_formula`: searchType is \"formula\" but the formula field was omitted. `missing_structure_args`: substructure/superstructure/similarity search missing query or queryType. `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not a positive integer CID. Other values are possible when a failure originates below the handler."
  9. 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",
      +      "searchType",
      +      "offset"
      +    ]
      +  },
      +  {
      +    "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. Declared by this tool: `missing_identifier_args`: searchType is \"identifier\" but identifierType or identifiers were omitted `missing_formula`: searchType is \"formula\" but the formula field was omitted `missing_structure_args`: substructure/superstructure/similarity search missing query or queryType `invalid_cid_query`: structure/similarity search with queryType \"cid\" but query is not a positive integer CID Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "missing_identifier_args",
      +            "missing_formula",
      +            "missing_structure_args",
      +            "invalid_cid_query"
      +          ],
      +          "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",
      -  "searchType",
      -  "offset"
      -]
  10. Changed11 schema fields changedv0.6.0
    • changedInput schema / properties / maxResults / description
      Previous value: -"Maximum CIDs to return (1-200). Default: 20."New value: +"Maximum CIDs to return per page (1-200). Use offset to reach matches past this page. Default: 20."
    • changedInput schema / properties / maxResults / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Zero-based index of the first CID to return. Pass the nextOffset from a previous call to read the following page. Identifier lookups resolve every match up front, so paging them is free; formula, substructure, superstructure, and similarity searches have to ask PubChem for offset + maxResults records to reach a page, so deep pages cost progressively more upstream — hence the 10000 ceiling. Default: 0.",
      +  "maximum": 10000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / nextOffset
      Added value: +{
      +  "description": "Offset to pass on the next call to continue past this page. Omitted when no further matches remain.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery guidance when no compounds matched — echoes search strategy and suggests how to broaden. Absent when results were returned."New value: +"Recovery guidance when no compounds matched, when the offset runs past the matches observed, when identifiers failed to resolve, or when further pages remain. Absent when this page is complete and every identifier resolved."
    • addedOutput schema / properties / offset
      Added value: +{
      +  "description": "Zero-based index of the first CID returned.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / shown / description
      Previous value: -"CIDs returned after the maxResults cap."New value: +"CIDs returned on this page."
    • changedOutput schema / properties / totalFound / description
      Previous value: -"Total CIDs found before the maxResults cap."New value: +"Exact number of matching CIDs across all pages. Omitted when a formula, substructure, superstructure, or similarity search saturated the records it requested — PubChem returns no match count for those, so totalFoundAtLeast reports a floor instead."
    • addedOutput schema / properties / totalFoundAtLeast
      Added value: +{
      +  "description": "Lower bound on matching CIDs, reported in place of totalFound when the exact count is unavailable. At least this many match, and the true total may be higher; page further with offset to observe more.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when CIDs were capped at maxResults — more matches exist than returned."New value: +"True when matching CIDs remain past this page."
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "searchType",
      -  "totalFound"
      -]New value: +[
      +  "results",
      +  "searchType",
      +  "offset"
      +]
  11. Changed1 schema field changedv0.2.5
    • addedOutput schema / properties / unresolvedIdentifiers
      Added value: +{
      +  "description": "Identifier-mode only: input identifiers that resolved to no CID. Omitted when every identifier resolved and for non-identifier searches.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  12. Changed3 schema fields changedv0.2.4
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The maxResults cap that was applied.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "CIDs returned after the maxResults cap.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when CIDs were capped at maxResults — more matches exist than returned.",
      +  "type": "boolean"
      +}
  13. Changed9 schema fields changedv0.1.22
    • changedInput schema / properties / identifiers / description
      Previous value: -"Required for identifier search. Array of identifiers to resolve (1-25). Examples: [\"aspirin\", \"ibuprofen\"] for name, [\"CC(=O)OC1=CC=CC=C1C(=O)O\"] for SMILES."New value: +"Required for identifier search. Array of identifiers to resolve (1-25). Examples: [\"aspirin\", \"ibuprofen\"] for name, [\"CC(=O)OC1=CC=CC=C1C(=O)O\"] for SMILES, [\"BSYNRYMUTXBXSQ-UHFFFAOYSA-N\"] for inchikey (27-char block format)."
    • changedInput schema / properties / query / description
      Previous value: -"Required for substructure/superstructure/similarity searches. A SMILES string or PubChem CID (as string) for the query structure."New value: +"Required for substructure/superstructure/similarity searches. A SMILES string (e.g. \"CC(=O)O\") or PubChem CID as a string (e.g. \"2244\")."
    • changedInput schema / properties / searchType / description
      Previous value: -"Search strategy: \"identifier\" (name/SMILES/InChIKey lookup), \"formula\", \"substructure\", \"superstructure\", or \"similarity\"."New value: +"Search strategy. \"identifier\": name/SMILES/InChIKey lookup. \"formula\": molecular formula. \"substructure\": find compounds containing the query as a substructure. \"superstructure\": find compounds that are themselves substructures of the query. \"similarity\": 2D Tanimoto similarity to the query."
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Recovery guidance when no compounds matched — echoes search strategy and suggests how to broaden. Absent when results were returned.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / description
      Added value: +"Matching compound entry."
    • changedOutput schema / properties / results / items / properties / properties / description
      Previous value: -"Compound properties when requested."New value: +"Compound properties keyed by name (echoes input.properties; only present when requested)."
    • changedOutput schema / properties / searchType / description
      Previous value: -"The search strategy used."New value: +"Search strategy used: identifier, formula, substructure, superstructure, or similarity."
    • changedOutput schema / properties / totalFound / description
      Previous value: -"Total CIDs found (before maxResults cap)."New value: +"Total CIDs found before the maxResults cap."
    • changedOutput schema / required
      Previous value: -[
      -  "searchType",
      -  "totalFound",
      -  "results"
      -]New value: +[
      +  "results",
      +  "searchType",
      +  "totalFound"
      +]
  14. First observedv0.1.11

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, openWorld), but the description adds substantial operational context: per-call caps of 25 identifiers and 200 results with the excess surfaced in cappedInputs, an offset ceiling of 10000 for four modes versus full paging for lookup/assay/mass, PubChem's 1000000 match count, timeout risk on wide mass windows, and the fact hits arrive in PubChem order rather than ranked. It even warns that threshold 100 means a matching fingerprint, not an identical compound.

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 tool's purpose and the full mode list before the return/paging notes, and every clause carries information. The two sentences are long and dense, but no sentence is filler; a slight structural cost comes from cramming caps, paging, and hydration into the tail.

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?

A 16-parameter tool with four enums and an output schema is amply covered between the schema and this description, which additionally explains return shape (a page of CIDs, similarity hits with scores) and cross-references pubchem_search_assays and pubchem_get_bioactivity. The only shortfall is that the description doesn't restate how the hydrated properties appear in the response, though the output schema presumably does.

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?

With 100% schema coverage the schema carries most parameter meaning, so the baseline is 3, but the description adds real semantics: the 25-per-call identifier cap with input-order passthrough, Hill notation for formulas, similarity hits returned with their Tanimoto score, and offset semantics for paging. It doesn't add much beyond the schema for massType or allowOtherElements, keeping it below a 5.

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 ("Search PubChem for chemical compounds") and then enumerates every supported mode: identifier, formula, substructure/superstructure, Tanimoto similarity, bioassay AID, and mass range. It also names the sibling it can replace ("avoid a follow-up pubchem_get_compound_details call"), so an agent can place it against the catalog without opening a schema.

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?

Each search mode is tied to its required inputs (identifierType/identifiers, formula, query+queryType, aid, massType/massMin/massMax), which tells the agent which mode fits a given request. It also gives decision guidance for threshold (90+ close analogs, 70-80 scaffold hops). What's missing is an explicit "use this instead of X when..." exclusion statement for the sibling details/bioactivity tools, so it stops short of a 5.

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