# `pubchem__pubchem_get_compound_details`

**Get Compound Details**

Get detailed compound information by CID. Returns physicochemical properties (molecular weight, SMILES, InChIKey, XLogP, TPSA, etc.), optionally with a textual description (pharmacology, mechanism, therapeutic use), known synonyms, drug-likeness assessment (Lipinski/Veber rules), and/or pharmacological classification (FDA classes, MeSH classes, ATC codes). Accepts up to 100 CIDs per call.

- Server: [PubChem](https://gateway.mcpharbor.dev/docs/servers/pubchem) (`dev.mcpharbor.gateway/pubchem`)
- Price per call: $0.0001 (100 micro-USD); only tools/call is charged
- Endpoint: `https://gateway.mcpharbor.dev/mcp` or `https://gateway.mcpharbor.dev/mcp/pubchem`
- Upstream tool: exposed by the provider; called through this gateway as `pubchem__pubchem_get_compound_details`
- Provider terms: <https://www.ncbi.nlm.nih.gov/home/about/policies/> (verified 2026-09-19)
- Upstream API documentation: <https://pubchem.ncbi.nlm.nih.gov/docs/pug-rest>
- Rate limit: 350 requests per minute
- Attribution required: Attribution to source recommended, not mandatory

## Parameters

- `cids` (array, required): PubChem Compound IDs to fetch (1-100). Resolve from names/SMILES with pubchem_search_compounds.
- `descriptionOffset` (integer, optional): Zero-based index of the first description to return within each compound's description list. The same offset is applied to every compound in the batch. Pass the nextDescriptionOffset from a previou... Default: `0`.
- `includeClassification` (boolean, optional): Include pharmacological classification: FDA Established Pharmacologic Classes, mechanisms of action, MeSH classes, and ATC codes. Fetched only for the first 10 CIDs in the batch; remaining CIDs ret... Default: `false`.
- `includeDescription` (boolean, optional): Include textual descriptions (pharmacology, mechanism, therapeutic use) attributed by source. Well-studied compounds have many overlapping summaries — paged via descriptionOffset/maxDescriptions. F... Default: `false`.
- `includeDrugLikeness` (boolean, optional): Compute drug-likeness assessment: Lipinski Rule of Five (MW, XLogP, HBD, HBA) and Veber rules (TPSA, rotatable bonds). Computed from the returned properties, so it adds no latency. Default: `false`.
- `includeSynonyms` (boolean, optional): Fetch known names and synonyms (trade names, systematic names, registry numbers), paged via synonymOffset/maxSynonyms. Fetched for every found CID in the batch. Slower for large CID lists. Default: `false`.
- `maxDescriptions` (integer, optional): Max number of distinct description entries per compound per page (1-20). PubChem returns near-duplicate summaries from many depositors; duplicates are collapsed before this cap applies. Default: 3. Default: `3`.
- `maxSynonyms` (integer, optional): Max synonyms returned per compound per page (1-100). PubChem lists hundreds for common drugs; use synonymOffset to reach the ones past this page. Default: 20. Default: `20`.
- `properties` (array, optional): Properties to retrieve. Defaults to a core set: MolecularFormula, MolecularWeight, IUPACName, CanonicalSMILES, IsomericSMILES, InChIKey, XLogP, TPSA, HBondDonorCount, HBondAcceptorCount, RotatableB...
- `synonymOffset` (integer, optional): Zero-based index of the first synonym to return within each compound's synonym list. The same offset is applied to every compound in the batch. Pass the nextSynonymOffset from a previous call to re... Default: `0`.

## Example call

Request headers and body:

```http
POST /mcp HTTP/1.1
Host: gateway.mcpharbor.dev
Authorization: Bearer <your gateway API key>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: pubchem__pubchem_get_compound_details
```

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/clientCapabilities": {},
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-agent",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    },
    "arguments": {
      "cids": []
    },
    "name": "pubchem__pubchem_get_compound_details"
  }
}
```

A successful response:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "_meta": {
      "dev.mcpharbor.gateway/call": {
        "chargedMicroUsd": 100,
        "id": "<the id of this charge>"
      }
    },
    "content": [
      {
        "text": "<whatever the upstream tool returned>",
        "type": "text"
      }
    ],
    "resultType": "complete"
  }
}
```

This call costs $0.0001 (100 micro-USD). Reading this page and listing the tool cost nothing.
The `dev.mcpharbor.gateway/call` record in the result is the receipt for that charge. Each
POST is metered separately, so sending the same call again buys another one: see
[agent.txt](https://gateway.mcpharbor.dev/agent.txt), section 7, before retrying.

## Attribution

This provider requires the attribution below wherever you use results from its tools.
Reproduce it verbatim:

> Attribution to source recommended, not mandatory

## Tool definition

Exactly as `tools/list` returns it (free):

```json
{
  "_meta": {
    "dev.mcpharbor.gateway/pricing": {
      "currency": "USD",
      "pricePerCallMicroUsd": 100
    }
  },
  "annotations": {
    "idempotentHint": true,
    "openWorldHint": true,
    "readOnlyHint": true
  },
  "description": "Get detailed compound information by CID. Returns physicochemical properties (molecular weight, SMILES, InChIKey, XLogP, TPSA, etc.), optionally with a textual description (pharmacology, mechanism, therapeutic use), known synonyms, drug-likeness assessment (Lipinski/Veber rules), and/or pharmacological classification (FDA classes, MeSH classes, ATC codes). Accepts up to 100 CIDs per call.",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "cids": {
        "description": "PubChem Compound IDs to fetch (1-100). Resolve from names/SMILES with pubchem_search_compounds.",
        "items": {
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991,
          "type": "integer"
        },
        "maxItems": 100,
        "minItems": 1,
        "type": "array"
      },
      "descriptionOffset": {
        "default": 0,
        "description": "Zero-based index of the first description to return within each compound's description list. The same offset is applied to every compound in the batch. Pass the nextDescriptionOffset from a previous call to read the following page. Default: 0.",
        "maximum": 9007199254740991,
        "minimum": 0,
        "type": "integer"
      },
      "includeClassification": {
        "default": false,
        "description": "Include pharmacological classification: FDA Established Pharmacologic Classes, mechanisms of action, MeSH classes, and ATC codes. Fetched only for the first 10 CIDs in the batch; remaining CIDs return without classification and are listed in the response's skippedCids.",
        "type": "boolean"
      },
      "includeDescription": {
        "default": false,
        "description": "Include textual descriptions (pharmacology, mechanism, therapeutic use) attributed by source. Well-studied compounds have many overlapping summaries — paged via descriptionOffset/maxDescriptions. Fetched only for the first 10 CIDs in the batch; remaining CIDs return without descriptions and are listed in the response's skippedCids.",
        "type": "boolean"
      },
      "includeDrugLikeness": {
        "default": false,
        "description": "Compute drug-likeness assessment: Lipinski Rule of Five (MW, XLogP, HBD, HBA) and Veber rules (TPSA, rotatable bonds). Computed from the returned properties, so it adds no latency.",
        "type": "boolean"
      },
      "includeSynonyms": {
        "default": false,
        "description": "Fetch known names and synonyms (trade names, systematic names, registry numbers), paged via synonymOffset/maxSynonyms. Fetched for every found CID in the batch. Slower for large CID lists.",
        "type": "boolean"
      },
      "maxDescriptions": {
        "default": 3,
        "description": "Max number of distinct description entries per compound per page (1-20). PubChem returns near-duplicate summaries from many depositors; duplicates are collapsed before this cap applies. Default: 3.",
        "maximum": 20,
        "minimum": 1,
        "type": "integer"
      },
      "maxSynonyms": {
        "default": 20,
        "description": "Max synonyms returned per compound per page (1-100). PubChem lists hundreds for common drugs; use synonymOffset to reach the ones past this page. Default: 20.",
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      },
      "properties": {
        "description": "Properties to retrieve. Defaults to a core set: MolecularFormula, MolecularWeight, IUPACName, CanonicalSMILES, IsomericSMILES, InChIKey, XLogP, TPSA, HBondDonorCount, HBondAcceptorCount, RotatableBondCount, HeavyAtomCount, Charge, Complexity.",
        "items": {
          "enum": [
            "MolecularFormula",
            "MolecularWeight",
            "CanonicalSMILES",
            "IsomericSMILES",
            "InChI",
            "InChIKey",
            "IUPACName",
            "Title",
            "XLogP",
            "ExactMass",
            "MonoisotopicMass",
            "TPSA",
            "Complexity",
            "Charge",
            "HBondDonorCount",
            "HBondAcceptorCount",
            "RotatableBondCount",
            "HeavyAtomCount",
            "IsotopeAtomCount",
            "AtomStereoCount",
            "DefinedAtomStereoCount",
            "UndefinedAtomStereoCount",
            "BondStereoCount",
            "DefinedBondStereoCount",
            "UndefinedBondStereoCount",
            "CovalentUnitCount",
            "Volume3D"
          ],
          "type": "string"
        },
        "type": "array"
      },
      "synonymOffset": {
        "default": 0,
        "description": "Zero-based index of the first synonym to return within each compound's synonym list. The same offset is applied to every compound in the batch. Pass the nextSynonymOffset from a previous call to read the following page. Default: 0.",
        "maximum": 9007199254740991,
        "minimum": 0,
        "type": "integer"
      }
    },
    "required": [
      "cids"
    ],
    "type": "object"
  },
  "name": "pubchem__pubchem_get_compound_details",
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "anyOf": [
      {
        "not": {
          "required": [
            "error"
          ]
        },
        "required": [
          "compounds",
          "truncated"
        ]
      },
      {
        "required": [
          "error"
        ]
      }
    ],
    "properties": {
      "compounds": {
        "description": "Compound detail records.",
        "items": {
          "additionalProperties": false,
          "description": "Per-CID compound detail record.",
          "properties": {
            "cid": {
              "description": "PubChem Compound ID.",
              "type": "number"
            },
            "classification": {
              "additionalProperties": false,
              "description": "Pharmacological classification (FDA, MeSH, ATC).",
              "properties": {
                "atcCodes": {
                  "description": "ATC codes with hierarchical descriptions.",
                  "items": {
                    "additionalProperties": false,
                    "description": "ATC code entry with hierarchical description.",
                    "properties": {
                      "code": {
                        "description": "ATC code.",
                        "type": "string"
                      },
                      "description": {
                        "description": "ATC code description.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "description"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "fdaClasses": {
                  "description": "FDA Established Pharmacologic Classes.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "fdaMechanisms": {
                  "description": "FDA Mechanisms of Action.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "meshClasses": {
                  "description": "MeSH pharmacological class descriptions.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "atcCodes",
                "fdaClasses",
                "fdaMechanisms",
                "meshClasses"
              ],
              "type": "object"
            },
            "descriptions": {
              "description": "Textual descriptions on this page, deduplicated then windowed by descriptionOffset/maxDescriptions. Each entry carries optional source attribution. Empty when descriptionOffset runs past descriptionsTotal.",
              "items": {
                "additionalProperties": false,
                "description": "Description entry with optional source attribution.",
                "properties": {
                  "source": {
                    "description": "Depositor source (e.g. \"DrugBank\", \"Wikipedia\", \"ChEBI\").",
                    "type": "string"
                  },
                  "text": {
                    "description": "Description text.",
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "descriptionsTotal": {
              "description": "Total distinct descriptions available for this compound, across all pages. Larger than descriptions.length when more sources exist — raise maxDescriptions or page with descriptionOffset to see them.",
              "type": "number"
            },
            "drugLikeness": {
              "additionalProperties": false,
              "description": "Drug-likeness assessment. lipinski.violations ≤ 1 and veber.violations = 0 → pass.",
              "properties": {
                "lipinski": {
                  "additionalProperties": false,
                  "description": "Lipinski Rule of Five evaluation.",
                  "properties": {
                    "hba": {
                      "additionalProperties": false,
                      "description": "HBond acceptor count rule (≤10).",
                      "properties": {
                        "limit": {
                          "description": "Rule threshold.",
                          "type": "number"
                        },
                        "pass": {
                          "description": "Whether the rule passes (null if value unavailable).",
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "value": {
                          "description": "Measured value (null if unavailable).",
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "limit",
                        "pass",
                        "value"
                      ],
                      "type": "object"
                    },
                    "hbd": {
                      "additionalProperties": false,
                      "description": "HBond donor count rule (≤5).",
                      "properties": {
                        "limit": {
                          "description": "Rule threshold.",
                          "type": "number"
                        },
                        "pass": {
                          "description": "Whether the rule passes (null if value unavailable).",
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "value": {
                          "description": "Measured value (null if unavailable).",
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "limit",
                        "pass",
                        "value"
                      ],
                      "type": "object"
                    },
                    "mw": {
                      "additionalProperties": false,
                      "description": "Molecular weight rule (≤500 g/mol).",
                      "properties": {
                        "limit": {
                          "description": "Rule threshold.",
                          "type": "number"
                        },
                        "pass": {
                          "description": "Whether the rule passes (null if value unavailable).",
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "value": {
                          "description": "Measured value (null if unavailable).",
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "limit",
                        "pass",
                        "value"
                      ],
                      "type": "object"
                    },
                    "violations": {
                      "description": "Number of Lipinski violations (0-4).",
                      "type": "number"
                    },
                    "xLogP": {
                      "additionalProperties": false,
                      "description": "XLogP rule (≤5; calculated logP).",
                      "properties": {
                        "limit": {
                          "description": "Rule threshold.",
                          "type": "number"
                        },
                        "pass": {
                          "description": "Whether the rule passes (null if value unavailable).",
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "value": {
                          "description": "Measured value (null if unavailable).",
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "limit",
                        "pass",
                        "value"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "hba",
                    "hbd",
                    "mw",
                    "violations",
                    "xLogP"
                  ],
                  "type": "object"
                },
                "pass": {
                  "description": "Overall drug-likeness pass. Null when insufficient properties were available.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "veber": {
                  "additionalProperties": false,
                  "description": "Veber rules evaluation.",
                  "properties": {
                    "rotatableBonds": {
                      "additionalProperties": false,
                      "description": "Rotatable bond count rule (≤10).",
                      "properties": {
                        "limit": {
                          "description": "Rule threshold.",
                          "type": "number"
                        },
                        "pass": {
                          "description": "Whether the rule passes (null if value unavailable).",
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "value": {
                          "description": "Measured value (null if unavailable).",
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "limit",
                        "pass",
                        "value"
                      ],
                      "type": "object"
                    },
                    "tpsa": {
                      "additionalProperties": false,
                      "description": "Topological polar surface area rule (≤140 Å²).",
                      "properties": {
                        "limit": {
                          "description": "Rule threshold.",
                          "type": "number"
                        },
                        "pass": {
                          "description": "Whether the rule passes (null if value unavailable).",
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "value": {
                          "description": "Measured value (null if unavailable).",
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "limit",
                        "pass",
                        "value"
                      ],
                      "type": "object"
                    },
                    "violations": {
                      "description": "Number of Veber violations (0-2).",
                      "type": "number"
                    }
                  },
                  "required": [
                    "rotatableBonds",
                    "tpsa",
                    "violations"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "lipinski",
                "pass",
                "veber"
              ],
              "type": "object"
            },
            "found": {
              "description": "False when the CID does not exist in PubChem (properties, description, etc. are empty).",
              "type": "boolean"
            },
            "properties": {
              "additionalProperties": {},
              "description": "Physicochemical properties keyed by name (echoes input.properties or the default core set; drug-likeness inputs are appended automatically when includeDrugLikeness is true).",
              "propertyNames": {
                "type": "string"
              },
              "type": "object"
            },
            "synonyms": {
              "description": "Known names and synonyms on this page, windowed by synonymOffset/maxSynonyms. Empty when synonymOffset runs past synonymsTotal.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "synonymsTotal": {
              "description": "Total synonyms available for this compound, across all pages. Larger than synonyms.length when more exist — raise maxSynonyms or page with synonymOffset to see them.",
              "type": "number"
            }
          },
          "required": [
            "cid",
            "found",
            "properties"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "descriptionOffset": {
        "description": "Zero-based index of the first description returned within each compound's list. Present when includeDescription is true.",
        "type": "number"
      },
      "enrichedCids": {
        "description": "CIDs whose descriptions and classification were fetched. Present only when the batch exceeded the per-call fan-out limit and other CIDs were skipped.",
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "error": {
        "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"
      },
      "nextDescriptionOffset": {
        "description": "descriptionOffset to pass on the next call to continue past this page. Omitted when no compound in the batch has further descriptions.",
        "type": "number"
      },
      "nextSynonymOffset": {
        "description": "synonymOffset to pass on the next call to continue past this page. Omitted when no compound in the batch has further synonyms.",
        "type": "number"
      },
      "notice": {
        "description": "Recovery guidance covering the skipped CIDs, an offset that runs past every compound, and pages that remain. Absent when nothing was skipped or truncated.",
        "type": "string"
      },
      "skippedCids": {
        "description": "CIDs found in PubChem whose descriptions and classification were NOT fetched because the batch exceeded the per-call fan-out limit. Their absence from a record means \"not requested\", not \"PubChem has none\" — re-request these CIDs in a follow-up call. Present only when CIDs were skipped.",
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "synonymOffset": {
        "description": "Zero-based index of the first synonym returned within each compound's list. Present when includeSynonyms is true.",
        "type": "number"
      },
      "truncated": {
        "description": "True when this response is not the whole picture: a compound has further synonyms or descriptions past this page, or CIDs were skipped by the per-call fan-out limit. Per-compound totals are in compounds[].synonymsTotal / compounds[].descriptionsTotal; the skipped CIDs are in skippedCids.",
        "type": "boolean"
      }
    },
    "type": "object"
  },
  "title": "Get Compound Details"
}
```
