pubchem-mcp-server
Search PubChem compounds, properties, safety data, bioactivity, and cross-references.
사용해야 할까요
품질 및 안전성
발견 사항 (2)
- LOWpubchem_get_compound_3d_structure에서
- LOWpubchem_get_compound_interactions에서
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"pubchem-mcp-server": {
"command": "bun",
"args": [
"@cyanheads/pubchem-mcp-server"
]
}
}
}실행 가능한 패키지
0.6.5streamable-http원격 엔드포인트
https://pubchem.caseyjhand.com/mcpstreamable-http할 수 있는 일
도구 목록
도구 (10)
🟢pubchem_search_compounds(searchType, identifierType, identifiers, formula, allowOtherElements, ...)
Search PubChem for chemical compounds by identifier (name, SMILES, or InChIKey, batched up to 25), molecular formula in Hill notation, substructure or superstructure containment, or 2D Tanimoto similarity. Returns a page of CIDs — reach matches past maxResults with offset. Optionally hydrate results with properties to avoid a follow-up pubchem_get_compound_details call.
입력 스키마
{
"type": "object",
"properties": {
"searchType": {
"type": "string",
"enum": [
"identifier",
"formula",
"substructure",
"superstructure",
"similarity"
],
"description": "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."
},
"identifierType": {
"description": "Required for identifier search. Type of chemical identifier: \"name\", \"smiles\", or \"inchikey\".",
"type": "string",
"enum": [
"name",
"smiles",
"inchikey"
]
},
"identifiers": {
"description": "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).",
"minItems": 1,
"maxItems": 25,
"type": "array",
"items": {
"type": "string"
}
},
"formula": {
"description": "Required for formula search. Molecular formula in Hill notation (e.g. \"C6H12O6\", \"CaH2O2\").",
"type": "string"
},
"allowOtherElements": {
"default": false,
"description": "Formula search only. When true, includes compounds with additional elements beyond the formula.",
"type": "boolean"
},
"query": {
"description": "Required for substructure/superstructure/similarity searches. A SMILES string (e.g. \"CC(=O)O\") or PubChem CID as a string (e.g. \"2244\").",
"type": "string"
},
"queryType": {
"description": "Required for structure/similarity searches. Format of the query: \"smiles\" or \"cid\".",
"type": "string",
"enum": [
"smiles",
"cid"
]
},
"threshold": {
"default": 90,
"description": "Similarity search only. Minimum Tanimoto similarity (70-100). 90+ for close analogs, 70-80 for scaffold hops. Default: 90.",
"type": "number",
"minimum": 70,
"maximum": 100
},
"offset": {
"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.",
"type": "integer",
"minimum": 0,
"maximum": 10000
},
"maxResults": {
"default": 20,
"description": "Maximum CIDs to return per page (1-200). Use offset to reach matches past this page. Default: 20.",
"type": "integer",
"minimum": 1,
"maximum": 200
},
"properties": {
"description": "Optional: fetch these properties for each result, avoiding a follow-up details call. E.g. [\"MolecularFormula\", \"MolecularWeight\", \"CanonicalSMILES\"].",
"type": "array",
"items": {
"type": "string",
"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"
]
}
}
},
"required": [
"searchType"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cid": {
"type": "number",
"description": "PubChem Compound ID."
},
"identifier": {
"description": "Echoed input identifier (identifier mode only).",
"type": "string"
},
"properties": {
"description": "Compound properties keyed by name (echoes input.properties; only present when requested).",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"cid"
],
"additionalProperties": false,
"description": "Matching compound entry."
},
"description": "Matching compounds."
},
"unresolvedIdentifiers": {
"description": "Identifier-mode only: input identifiers that resolved to no CID. Omitted when every identifier resolved and for non-identifier searches.",
"type": "array",
"items": {
"type": "string"
}
},
"searchType": {
"type": "string",
"description": "Search strategy used: identifier, formula, substructure, superstructure, or similarity."
},
"totalFound": {
"description": "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.",
"type": "number"
},
"totalFoundAtLeast": {
"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"
},
"offset": {
"type": "number",
"description": "Zero-based index of the first CID returned."
},
"nextOffset": {
"description": "Offset to pass on the next call to continue past this page. Omitted when no further matches remain.",
"type": "number"
},
"truncated": {
"description": "True when matching CIDs remain past this page.",
"type": "boolean"
},
"shown": {
"description": "CIDs returned on this page.",
"type": "number"
},
"cap": {
"description": "The maxResults cap that was applied.",
"type": "number"
},
"notice": {
"description": "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.",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"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"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"results",
"searchType",
"offset"
]
},
{
"required": [
"error"
]
}
]
}🟢pubchem_get_compound_details(cids, properties, includeDescription, descriptionOffset, maxDescriptions, ...)
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.
입력 스키마
{
"type": "object",
"properties": {
"cids": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"description": "PubChem Compound IDs to fetch (1-100). Resolve from names/SMILES with pubchem_search_compounds."
},
"properties": {
"description": "Properties to retrieve. Defaults to a core set: MolecularFormula, MolecularWeight, IUPACName, CanonicalSMILES, IsomericSMILES, InChIKey, XLogP, TPSA, HBondDonorCount, HBondAcceptorCount, RotatableBondCount, HeavyAtomCount, Charge, Complexity.",
"type": "array",
"items": {
"type": "string",
"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"
]
}
},
"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"
},
"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.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"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.",
"type": "integer",
"minimum": 1,
"maximum": 20
},
"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"
},
"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.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"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.",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"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"
},
"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"
}
},
"required": [
"cids"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"compounds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cid": {
"type": "number",
"description": "PubChem Compound ID."
},
"found": {
"type": "boolean",
"description": "False when the CID does not exist in PubChem (properties, description, etc. are empty)."
},
"properties": {
"type": "object",
"propertyNames": {
"type": "string"
},
"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)."
},
"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.",
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"description": "Depositor source (e.g. \"DrugBank\", \"Wikipedia\", \"ChEBI\").",
"type": "string"
},
"text": {
"type": "string",
"description": "Description text."
}
},
"required": [
"text"
],
"additionalProperties": false,
"description": "Description entry with optional source attribution."
}
},
"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"
},
"synonyms": {
"description": "Known names and synonyms on this page, windowed by synonymOffset/maxSynonyms. Empty when synonymOffset runs past synonymsTotal.",
"type": "array",
"items": {
"type": "string"
}
},
"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"
},
"drugLikeness": {
"description": "Drug-likeness assessment. lipinski.violations ≤ 1 and veber.violations = 0 → pass.",
"type": "object",
"properties": {
"lipinski": {
"type": "object",
"properties": {
"hba": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Rule threshold."
},
"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"
],
"additionalProperties": false,
"description": "HBond acceptor count rule (≤10)."
},
"hbd": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Rule threshold."
},
"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"
],
"additionalProperties": false,
"description": "HBond donor count rule (≤5)."
},
"mw": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Rule threshold."
},
"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"
],
"additionalProperties": false,
"description": "Molecular weight rule (≤500 g/mol)."
},
"violations": {
"type": "number",
"description": "Number of Lipinski violations (0-4)."
},
"xLogP": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Rule threshold."
},
"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"
],
"additionalProperties": false,
"description": "XLogP rule (≤5; calculated logP)."
}
},
"required": [
"hba",
"hbd",
"mw",
"violations",
"xLogP"
],
"additionalProperties": false,
"description": "Lipinski Rule of Five evaluation."
},
"pass": {
"description": "Overall drug-likeness pass. Null when insufficient properties were available.",
"type": [
"boolean",
"null"
]
},
"veber": {
"type": "object",
"properties": {
"rotatableBonds": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Rule threshold."
},
"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"
],
"additionalProperties": false,
"description": "Rotatable bond count rule (≤10)."
},
"tpsa": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Rule threshold."
},
"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"
],
"additionalProperties": false,
"description": "Topological polar surface area rule (≤140 Ų)."
},
"violations": {
"type": "number",
"description": "Number of Veber violations (0-2)."
}
},
"required": [
"rotatableBonds",
"tpsa",
"violations"
],
"additionalProperties": false,
"description": "Veber rules evaluation."
}
},
"required": [
"lipinski",
"pass",
"veber"
],
"additionalProperties": false
},
"classification": {
"description": "Pharmacological classification (FDA, MeSH, ATC).",
"type": "object",
"properties": {
"atcCodes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "ATC code."
},
"description": {
"type": "string",
"description": "ATC code description."
}
},
"required": [
"code",
"description"
],
"additionalProperties": false,
"description": "ATC code entry with hierarchical description."
},
"description": "ATC codes with hierarchical descriptions."
},
"fdaClasses": {
"type": "array",
"items": {
"type": "string"
},
"description": "FDA Established Pharmacologic Classes."
},
"fdaMechanisms": {
"type": "array",
"items": {
"type": "string"
},
"description": "FDA Mechanisms of Action."
},
"meshClasses": {
"type": "array",
"items": {
"type": "string"
},
"description": "MeSH pharmacological class descriptions."
}
},
"required": [
"atcCodes",
"fdaClasses",
"fdaMechanisms",
"meshClasses"
],
"additionalProperties": false
}
},
"required": [
"cid",
"found",
"properties"
],
"additionalProperties": false,
"description": "Per-CID compound detail record."
},
"description": "Compound detail records."
},
"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.",
"type": "array",
"items": {
"type": "number"
}
},
"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.",
"type": "array",
"items": {
"type": "number"
}
},
"synonymOffset": {
"description": "Zero-based index of the first synonym returned within each compound's list. Present when includeSynonyms is true.",
"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"
},
"descriptionOffset": {
"description": "Zero-based index of the first description returned within each compound's list. Present when includeDescription is true.",
"type": "number"
},
"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"
},
"truncated": {
"type": "boolean",
"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."
},
"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"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode."
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"compounds",
"truncated"
]
},
{
"required": [
"error"
]
}
]
}🟢pubchem_get_compound_image(cid, size)
Fetch a 2D structure diagram (PNG image) for a compound by CID.
입력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds."
},
"size": {
"default": "large",
"description": "Image size: \"small\" (100x100) or \"large\" (300x300). Default: \"large\".",
"type": "string",
"enum": [
"small",
"large"
]
}
},
"required": [
"cid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "number",
"description": "PubChem Compound ID."
},
"imageBase64": {
"type": "string",
"description": "Base64-encoded PNG image data."
},
"mimeType": {
"type": "string",
"description": "MIME type — always \"image/png\"."
},
"width": {
"type": "number",
"description": "Image width in pixels."
},
"height": {
"type": "number",
"description": "Image height in pixels."
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `cid_not_found`: PubChem returned 404 for the requested CID. Other values are possible when a failure originates below the handler.",
"examples": [
"cid_not_found"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"cid",
"imageBase64",
"mimeType",
"width",
"height"
]
},
{
"required": [
"error"
]
}
]
}🟢pubchem_get_compound_3d_structure(cid, format, includeAlternateConformerIds, maxAtoms, maxBonds, ...)
Get a compound's default 3D conformer — atomic coordinates and bonds — for one CID. format="json" (default) returns atoms and bonds parsed into structured fields; format="sdf" returns the raw V2000 SDF text for passthrough to docking, rendering, or conformer tools. Optionally lists alternate conformer IDs. Not every compound has computed 3D coordinates (large molecules, mixtures, and some salts do not).
입력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds."
},
"format": {
"default": "json",
"description": "Output format. \"json\" (default) returns parsed atoms and bonds. \"sdf\" returns the raw V2000 SDF text for passthrough to other tools.",
"type": "string",
"enum": [
"sdf",
"json"
]
},
"includeAlternateConformerIds": {
"default": false,
"description": "List the IDs of additional computed conformers beyond the default. Slower than the default response. Default: false.",
"type": "boolean"
},
"maxAtoms": {
"description": "Cap the atoms returned in the format=\"json\" preview. atomCount always reports the full total; omitted rows are disclosed via the truncated/shownAtoms enrichment. Defaults to the first 200 atoms.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"maxBonds": {
"description": "Cap the bonds returned in the format=\"json\" preview. bondCount always reports the full total; omitted rows are disclosed via the truncated/shownBonds enrichment. Defaults to the first 200 bonds.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"includeRawSdf": {
"default": false,
"description": "For format=\"sdf\", return the complete raw V2000 SDF even when it exceeds the safe line cap. Default false: an SDF longer than 500 lines is line-capped with disclosure. No effect when format=\"json\".",
"type": "boolean"
}
},
"required": [
"cid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "number",
"description": "PubChem Compound ID."
},
"conformerId": {
"description": "Default (primary) conformer ID. Present when includeAlternateConformerIds is set.",
"type": "string"
},
"atomCount": {
"type": "number",
"description": "Number of atoms in the conformer."
},
"bondCount": {
"type": "number",
"description": "Number of bonds in the conformer."
},
"atoms": {
"description": "Parsed atoms. Populated when format=\"json\".",
"type": "array",
"items": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Element symbol (e.g. \"C\", \"O\", \"N\")."
},
"x": {
"type": "number",
"description": "X coordinate (Angstroms)."
},
"y": {
"type": "number",
"description": "Y coordinate (Angstroms)."
},
"z": {
"type": "number",
"description": "Z coordinate (Angstroms)."
}
},
"required": [
"element",
"x",
"y",
"z"
],
"additionalProperties": false,
"description": "Atom with 3D Cartesian coordinates."
}
},
"bonds": {
"description": "Parsed bonds. Populated when format=\"json\".",
"type": "array",
"items": {
"type": "object",
"properties": {
"a1": {
"type": "number",
"description": "First atom index (1-based)."
},
"a2": {
"type": "number",
"description": "Second atom index (1-based)."
},
"order": {
"type": "number",
"description": "Bond order (1=single, 2=double, 3=triple, 4=aromatic)."
}
},
"required": [
"a1",
"a2",
"order"
],
"additionalProperties": false,
"description": "Bond between two atoms."
}
},
"sdf": {
"description": "Raw V2000 SDF text. Populated when format=\"sdf\".",
"type": "string"
},
"alternateConformerIds": {
"description": "Conformer IDs beyond the default. Present when includeAlternateConformerIds is set and alternates exist.",
"type": "array",
"items": {
"type": "string"
}
},
"truncated": {
"description": "True when the atom list, bond list, or raw SDF was capped below its total. atomCount/bondCount always report the full totals.",
"type": "boolean"
},
"shownAtoms": {
"description": "Atoms returned after the cap, when fewer than atomCount. Raise maxAtoms for more.",
"type": "number"
},
"shownBonds": {
"description": "Bonds returned after the cap, when fewer than bondCount. Raise maxBonds for more.",
"type": "number"
},
"atomCap": {
"description": "The atom cap applied (explicit maxAtoms or the safe default), when the atom list was capped.",
"type": "number"
},
"bondCap": {
"description": "The bond cap applied (explicit maxBonds or the safe default), when the bond list was capped.",
"type": "number"
},
"shownSdfLines": {
"description": "SDF lines returned when format=\"sdf\" and the raw text was line-capped. Set includeRawSdf for the full record.",
"type": "number"
},
"notice": {
"description": "Guidance naming which lists were capped and how to widen them.",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `no_3d_structure`: PubChem has no computed 3D conformer for the requested CID. Other values are possible when a failure originates below the handler.",
"examples": [
"no_3d_structure"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"cid",
"atomCount",
"bondCount"
]
},
{
"required": [
"error"
]
}
]
}🟢pubchem_get_compound_xrefs(cid, xrefTypes, offset, maxPerType)
Get external database cross-references for a compound: PubMed citations, patent IDs, gene/protein associations, registry numbers, and taxonomy IDs. Results are paged per type — capped at maxPerType with the total count reported; reach the IDs past a page with offset.
입력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds."
},
"xrefTypes": {
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"RegistryID",
"RN",
"PubMedID",
"PatentID",
"GeneID",
"ProteinGI",
"TaxonomyID"
]
},
"description": "Cross-reference types to retrieve. String IDs: RegistryID (DSSTox/EPA registry numbers), RN (CAS numbers), PatentID. Numeric IDs: PubMedID, GeneID (NCBI Gene), ProteinGI (legacy NCBI Protein GI), TaxonomyID."
},
"offset": {
"default": 0,
"description": "Zero-based index of the first ID to return within each xref type. The same offset is applied to every requested type. Pass the nextOffset from a previous call to read the following page. Default: 0.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"maxPerType": {
"default": 50,
"description": "Max IDs to return per xref type per page (1-500). A compound may have thousands of PubMed references; use offset to reach the ones past this page. Total count always reported. Default: 50.",
"type": "integer",
"minimum": 1,
"maximum": 500
}
},
"required": [
"cid",
"xrefTypes"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "number",
"description": "PubChem Compound ID."
},
"xrefs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Cross-reference type: RegistryID, RN, PubMedID, PatentID, GeneID, ProteinGI, or TaxonomyID."
},
"ids": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "String-form cross-reference ID (e.g. CAS number, patent)."
},
{
"type": "number",
"description": "Numeric cross-reference ID (e.g. PubMed ID, Gene ID)."
}
],
"description": "Cross-reference identifier — string or number depending on type."
},
"description": "Cross-reference IDs on this page (window of offset + maxPerType)."
},
"totalAvailable": {
"type": "number",
"description": "Total IDs available for this type, across all pages."
},
"truncated": {
"type": "boolean",
"description": "True when IDs for this type remain past the current page."
}
},
"required": [
"type",
"ids",
"totalAvailable",
"truncated"
],
"additionalProperties": false,
"description": "Cross-reference group for one type."
},
"description": "Cross-references grouped by type."
},
"offset": {
"type": "number",
"description": "Zero-based index of the first ID returned within each type."
},
"truncated": {
"type": "boolean",
"description": "True when at least one requested type has IDs remaining past this page. Which types, and how many IDs each holds in total, is in xrefs[].truncated / xrefs[].totalAvailable."
},
"nextOffset": {
"description": "Offset to pass on the next call to continue past this page. Omitted when no requested type has further IDs.",
"type": "number"
},
"notice": {
"description": "Recovery guidance when every requested xref type returned zero IDs, when the offset runs past every type, or when further pages remain. Absent when this page is complete and non-empty.",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode."
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"cid",
"xrefs",
"offset",
"truncated"
]
},
{
"required": [
"error"
]
}
]
}🟢pubchem_get_compound_safety(cids)
Get GHS (Globally Harmonized System) hazard classification and safety data for one or more compounds by CID. Returns signal word, pictograms, hazard statements (H-codes), and precautionary statements (P-codes) per compound. Data sourced from PubChem depositors — source attribution included.
입력 스키마
{
"type": "object",
"properties": {
"cids": {
"minItems": 1,
"maxItems": 25,
"type": "array",
"items": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"description": "PubChem Compound IDs to fetch safety data for (1-25). Resolve from names/SMILES with pubchem_search_compounds."
}
},
"required": [
"cids"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cid": {
"type": "number",
"description": "PubChem Compound ID."
},
"hasData": {
"type": "boolean",
"description": "Whether GHS safety data is available for this compound."
},
"status": {
"type": "string",
"enum": [
"ok",
"no_ghs_data",
"cid_not_found"
],
"description": "Outcome for this CID. \"ok\": GHS data returned. \"no_ghs_data\": the compound exists in PubChem but has no deposited GHS classification. \"cid_not_found\": PubChem has no record for this CID at all — the identifier is wrong, so verify it with pubchem_search_compounds rather than concluding the compound is unclassified."
},
"ghs": {
"type": "object",
"properties": {
"signalWord": {
"description": "GHS signal word: \"Danger\" or \"Warning\".",
"type": "string"
},
"pictograms": {
"type": "array",
"items": {
"type": "string"
},
"description": "GHS pictogram labels (e.g. \"Flammable\", \"Toxic\")."
},
"hazardStatements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "H-code (e.g. \"H225\")."
},
"statement": {
"type": "string",
"description": "Hazard statement text."
}
},
"required": [
"code",
"statement"
],
"additionalProperties": false,
"description": "GHS hazard statement entry."
},
"description": "GHS hazard statements."
},
"precautionaryStatements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "P-code (e.g. \"P210\")."
},
"statement": {
"type": "string",
"description": "Standard precautionary statement text for the code. Empty string when \"decoded\" is false — PubChem deposits P-codes without text, so a blank statement means the code was not decoded, never that the depositor supplied an empty statement."
},
"decoded": {
"type": "boolean",
"description": "Whether \"statement\" carries the standard text. False for codes needing label-specific fill text the depositor must supply (disposal method, firefighting agent, first-aid reference) and for codes outside the decoder table; the code itself is still authoritative."
}
},
"required": [
"code",
"statement",
"decoded"
],
"additionalProperties": false,
"description": "GHS precautionary statement entry."
},
"description": "GHS precautionary statements."
}
},
"required": [
"pictograms",
"hazardStatements",
"precautionaryStatements"
],
"additionalProperties": false,
"description": "GHS classification data."
},
"source": {
"description": "Data source attribution.",
"type": "string"
}
},
"required": [
"cid",
"hasData",
"status"
],
"additionalProperties": false,
"description": "Per-CID safety result."
},
"description": "Safety results, one per requested CID (input order preserved)."
},
"requestedCount": {
"type": "number",
"description": "CIDs requested."
},
"withDataCount": {
"type": "number",
"description": "CIDs with GHS safety data available."
},
"notice": {
"description": "Recovery guidance when one or more CIDs returned no GHS data, listing the unrecognized CIDs to verify separately from the CIDs that exist but carry no deposited classification.",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode."
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"results",
"requestedCount",
"withDataCount"
]
},
{
"required": [
"error"
]
}
]
}🟢pubchem_get_bioactivity(cid, outcomeFilter, targetGeneId, targetAccession, offset, ...)
Get a compound's bioactivity profile: which assays tested it, activity outcomes (Active/Inactive/Inconclusive), target identifiers (NCBI Gene ID, UniProt/GenBank accession), and quantitative values (IC50, EC50, Ki, etc.). Filter by outcome and/or a specific molecular target (NCBI Gene ID or protein accession) to focus the profile — e.g. "is this compound active against target T?".
입력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds."
},
"outcomeFilter": {
"default": "all",
"description": "Filter by activity outcome. \"active\" shows only assays where the compound showed activity — most useful for understanding biological profile. Default: \"all\".",
"type": "string",
"enum": [
"active",
"inactive",
"all"
]
},
"targetGeneId": {
"description": "Filter to assays against this NCBI Gene ID. Obtain Gene IDs from pubchem_search_assays or the targetGeneId field of an unfiltered result here. Combine with outcomeFilter=\"active\" to answer \"is this compound active against target T?\".",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"targetAccession": {
"description": "Filter to assays against this target protein accession (UniProt/GenBank), e.g. \"P35354\". Obtain accessions from pubchem_search_assays or the targetAccession field of an unfiltered result here.",
"type": "string"
},
"offset": {
"default": 0,
"description": "Zero-based index of the first assay to return, applied after the outcome and target filters. Pass the nextOffset from a previous call to read the following page. Default: 0.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"maxResults": {
"default": 20,
"description": "Max assay results to return per page (1-100). Well-studied compounds have thousands of records; use offset to reach the ones past this page. Default: 20.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"cid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "number",
"description": "PubChem Compound ID."
},
"totalAssays": {
"type": "number",
"description": "Total unique assays for this compound."
},
"activeCount": {
"type": "number",
"description": "Assays with \"Active\" outcome."
},
"inactiveCount": {
"type": "number",
"description": "Assays with \"Inactive\" outcome."
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"aid": {
"type": "number",
"description": "PubChem Assay ID."
},
"assayName": {
"type": "string",
"description": "Assay name/title."
},
"outcome": {
"type": "string",
"description": "Activity outcome: Active, Inactive, Inconclusive, Unspecified."
},
"targetAccession": {
"description": "Target protein accession (UniProt/GenBank).",
"type": "string"
},
"targetGeneId": {
"description": "Target NCBI Gene ID.",
"type": "number"
},
"activityValues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Measurement name (e.g. IC50, EC50, Ki). Omitted when not reported.",
"type": "string"
},
"value": {
"type": "number",
"description": "Measured value."
},
"unit": {
"description": "Unit of measurement (e.g. uM, nM). Omitted when not reported.",
"type": "string"
}
},
"required": [
"value"
],
"additionalProperties": false,
"description": "Quantitative activity measurement entry."
},
"description": "Quantitative activity measurements."
}
},
"required": [
"aid",
"assayName",
"outcome",
"activityValues"
],
"additionalProperties": false,
"description": "Assay result entry."
},
"description": "Assay results matching the filter."
},
"outcomeFilter": {
"type": "string",
"description": "Outcome filter applied: active, inactive, or all."
},
"targetFilter": {
"description": "Target filter applied (gene ID and/or protein accession), when set.",
"type": "string"
},
"filteredCount": {
"type": "number",
"description": "Exact number of assays matching the outcome and target filters, across all pages."
},
"returnedCount": {
"type": "number",
"description": "Assays returned on this page."
},
"offset": {
"type": "number",
"description": "Zero-based index of the first assay returned."
},
"nextOffset": {
"description": "Offset to pass on the next call to continue past this page. Omitted when no further assays match.",
"type": "number"
},
"truncated": {
"description": "True when matching assays remain past this page.",
"type": "boolean"
},
"shown": {
"description": "Assays returned on this page.",
"type": "number"
},
"cap": {
"description": "The maxResults cap that was applied.",
"type": "number"
},
"notice": {
"description": "Recovery guidance when the filter yields no results or the compound has no bioactivity data.",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode."
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"cid",
"totalAssays",
"activeCount",
"inactiveCount",
"results",
"outcomeFilter",
"filteredCount",
"returnedCount",
"offset"
]
},
{
"required": [
"error"
]
}
]
}🟢pubchem_get_compound_interactions(cid, kinds, offset, maxEntries)
Get a compound's interaction data: drug-drug interactions (DrugBank), drug-food interactions, and chemical-target interactions (binding/activity from BindingDB, ChEMBL, and others). Each entry carries its originating source. Results are paged per kind, with the source-record total and the next offset reported for each. Richest for approved drugs; many compounds have no deposited interaction records.
입력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds."
},
"kinds": {
"default": [
"drug-drug"
],
"description": "Interaction kinds to fetch. \"drug-drug\" (interactions with other drugs), \"drug-food\" (dietary interactions), \"target\" (binding/activity against molecular targets). Default: [\"drug-drug\"].",
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"drug-drug",
"drug-food",
"target"
]
}
},
"offset": {
"default": 0,
"description": "Zero-based start position within each requested kind, counted in source records rather than returned entries. The same offset applies to every kind in the call, and the kinds advance at different rates — when paging past the first page, request one kind per call and pass that kind's nextOffset. Default: 0.",
"type": "integer",
"minimum": 0,
"maximum": 2147483646
},
"maxEntries": {
"default": 10,
"description": "Max entries per kind per page (1-50). Well-studied drugs have a long tail of interactions; use offset to reach the ones past this page. Default: 10.",
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"required": [
"cid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"cid": {
"type": "number",
"description": "PubChem Compound ID."
},
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"drug-drug",
"drug-food",
"target"
],
"description": "Interaction category."
},
"partner": {
"description": "Interacting compound, food, or target name as the source reports it.",
"type": "string"
},
"source": {
"type": "string",
"description": "Originating source (e.g. \"DrugBank\", \"BindingDB\")."
},
"text": {
"type": "string",
"description": "The interaction statement."
}
},
"required": [
"kind",
"source",
"text"
],
"additionalProperties": false,
"description": "A single interaction entry."
},
"description": "Interaction entries across the requested kinds."
},
"paging": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"drug-drug",
"drug-food",
"target"
],
"description": "Interaction category this page covers."
},
"returnedCount": {
"type": "number",
"description": "Interaction entries returned for this kind."
},
"totalRecords": {
"type": "number",
"description": "Source records available for this kind, across all pages. Entries are derived from these records and can be fewer: a \"target\" record naming no molecular target and a \"drug-drug\" record carrying no statement both yield nothing, and duplicate measurements collapse within a page. Pages divide the records, not the entries, so a duplicate split across two pages is reported on both."
},
"nextOffset": {
"description": "Offset to pass on the next call to continue this kind past the current page. Omitted when no records remain.",
"type": "number"
},
"truncated": {
"type": "boolean",
"description": "True when source records remain for this kind past the current page."
}
},
"required": [
"kind",
"returnedCount",
"totalRecords",
"truncated"
],
"additionalProperties": false,
"description": "Page position for one interaction kind."
},
"description": "Per-kind page position, one entry per requested kind that was retrieved. A kind listed in failedKinds is absent — its position is unknown, not exhausted."
},
"requestedKinds": {
"type": "string",
"description": "Interaction kinds requested (comma-separated)."
},
"returnedCount": {
"type": "number",
"description": "Total interaction entries returned across all kinds."
},
"truncated": {
"type": "boolean",
"description": "True when at least one requested kind has source records remaining past this page. Which kinds, and how many records each holds, is in paging[].truncated / paging[].totalRecords."
},
"offset": {
"type": "number",
"description": "Zero-based start position read within each requested kind."
},
"nextOffset": {
"description": "Offset to pass on the next call, reported when exactly one requested kind has records remaining. Omitted when none do, and when several do — those advance to different positions, so read paging[].nextOffset instead.",
"type": "number"
},
"failedKinds": {
"description": "Interaction kinds that could not be retrieved (comma-separated). The returned entries cover the kinds that succeeded; retry to re-attempt the failed ones.",
"type": "string"
},
"notice": {
"description": "Guidance when a kind failed, when no interaction data was found, when the offset runs past every requested kind, or when further pages remain. Absent when this page is complete and every kind resolved.",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode."
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"cid",
"entries",
"paging",
"requestedKinds",
"returnedCount",
"truncated",
"offset"
]
},
{
"required": [
"error"
]
}
]
}🟢pubchem_search_assays(targetType, targetQuery, offset, maxResults)
Find PubChem bioassays associated with a biological target. Search by gene symbol (e.g. "EGFR"), protein name, NCBI Gene ID, or UniProt accession. Returns a page of assay IDs (AIDs) — page past maxResults with offset — which can be explored further with pubchem_get_summary.
입력 스키마
{
"type": "object",
"properties": {
"targetType": {
"type": "string",
"enum": [
"genesymbol",
"proteinname",
"geneid",
"proteinaccession"
],
"description": "Target identifier type. \"genesymbol\" and \"proteinname\" accept text names. \"geneid\" accepts NCBI Gene IDs. \"proteinaccession\" accepts UniProt accessions."
},
"targetQuery": {
"type": "string",
"description": "Target identifier. Examples: \"EGFR\" (genesymbol), \"Epidermal growth factor receptor\" (proteinname), \"1956\" (geneid), \"P00533\" (proteinaccession)."
},
"offset": {
"default": 0,
"description": "Zero-based index of the first AID to return. Pass the nextOffset from a previous call to read the following page. Default: 0.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"maxResults": {
"default": 50,
"description": "Max AIDs to return per page (1-200). Popular targets may have thousands of assays; use offset to reach the ones past this page. Default: 50.",
"type": "integer",
"minimum": 1,
"maximum": 200
}
},
"required": [
"targetType",
"targetQuery"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"aids": {
"type": "array",
"items": {
"type": "number"
},
"description": "PubChem Assay IDs."
},
"targetType": {
"type": "string",
"description": "Target identifier type used: genesymbol, proteinname, geneid, or proteinaccession."
},
"targetQuery": {
"type": "string",
"description": "Target identifier searched."
},
"totalFound": {
"type": "number",
"description": "Total AIDs found for this target, across all pages."
},
"offset": {
"type": "number",
"description": "Zero-based index of the first AID returned."
},
"nextOffset": {
"description": "Offset to pass on the next call to continue past this page. Omitted when no further AIDs match.",
"type": "number"
},
"truncated": {
"description": "True when matching AIDs remain past this page.",
"type": "boolean"
},
"shown": {
"description": "AIDs returned on this page.",
"type": "number"
},
"cap": {
"description": "The maxResults cap that was applied.",
"type": "number"
},
"notice": {
"description": "Recovery guidance when no assays matched, when the offset runs past the result set, or when further pages remain. Absent when this page is complete and non-empty.",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `blank_target_query`: targetQuery is empty or whitespace-only. `invalid_geneid_query`: targetType is \"geneid\" but targetQuery is not a positive integer. Other values are possible when a failure originates below the handler.",
"examples": [
"blank_target_query",
"invalid_geneid_query"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"aids",
"targetType",
"targetQuery",
"totalFound",
"offset"
]
},
{
"required": [
"error"
]
}
]
}🟢pubchem_get_summary(entityType, identifiers)
Get descriptive summaries for PubChem entities by ID. Supports assays (AID), genes (Gene ID), proteins (UniProt accession), and taxonomy (Tax ID). Up to 10 per call.
입력 스키마
{
"type": "object",
"properties": {
"entityType": {
"type": "string",
"enum": [
"assay",
"gene",
"protein",
"taxonomy"
],
"description": "Entity type. Determines ID format and returned fields."
},
"identifiers": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "String identifier (e.g. UniProt accession)."
},
{
"type": "number",
"description": "Numeric identifier (e.g. AID, Gene ID, Tax ID)."
}
],
"description": "Entity identifier — string or number depending on entityType."
},
"description": "Entity identifiers (1-10). Type depends on entityType:\n- assay: AID (number), e.g. [1000]\n- gene: Gene ID (number), e.g. [1956]\n- protein: UniProt accession (string), e.g. [\"P00533\"]\n- taxonomy: Tax ID (number), e.g. [9606]"
}
},
"required": [
"entityType",
"identifiers"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"entityType": {
"type": "string",
"description": "Entity type queried."
},
"summaries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"identifier": {
"anyOf": [
{
"type": "string",
"description": "String identifier (e.g. UniProt accession)."
},
{
"type": "number",
"description": "Numeric identifier (e.g. AID, Gene ID, Tax ID)."
}
],
"description": "Queried identifier."
},
"found": {
"type": "boolean",
"description": "Whether the entity was found."
},
"data": {
"description": "Entity summary data. Populated fields depend on entityType.",
"type": "object",
"properties": {
"aid": {
"description": "Assay ID — present on assay summaries.",
"type": "number"
},
"name": {
"description": "Primary display name.",
"type": "string"
},
"description": {
"description": "Descriptive text when available.",
"type": "string"
},
"sourceName": {
"description": "Data source attribution (assay summaries).",
"type": "string"
},
"numSubstances": {
"description": "Substances tested (assay summaries).",
"type": "number"
},
"numActive": {
"description": "Substances marked active (assay summaries).",
"type": "number"
},
"geneId": {
"description": "NCBI Gene ID (gene summaries).",
"type": "number"
},
"symbol": {
"description": "Gene symbol (gene summaries).",
"type": "string"
},
"taxonomyId": {
"description": "NCBI Taxonomy ID (gene/protein/taxonomy summaries).",
"type": "number"
},
"taxonomy": {
"description": "Taxonomy scientific name (gene/protein summaries).",
"type": "string"
},
"synonyms": {
"description": "Known synonyms / other names.",
"type": "array",
"items": {
"type": "string"
}
},
"proteinAccession": {
"description": "Protein accession (protein summaries).",
"type": "string"
},
"scientificName": {
"description": "Scientific name (taxonomy summaries).",
"type": "string"
},
"commonName": {
"description": "Common name (taxonomy summaries).",
"type": "string"
},
"rank": {
"description": "Taxonomic rank (taxonomy summaries).",
"type": "string"
},
"lineage": {
"description": "Taxonomic lineage ordered from the most inclusive rank to the most specific, e.g. [\"Eukaryota\", \"Metazoa\", \"Chordata\"] (taxonomy summaries). Ranks that do not apply to the entity are omitted.",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"required": [
"identifier",
"found"
],
"additionalProperties": false,
"description": "Per-identifier summary result."
},
"description": "Summary results."
},
"requestedCount": {
"type": "number",
"description": "Identifiers requested."
},
"foundCount": {
"type": "number",
"description": "Identifiers resolved to a summary."
},
"notice": {
"description": "Recovery guidance when one or more identifiers were not found.",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode."
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"entityType",
"summaries",
"requestedCount",
"foundCount"
]
},
{
"required": [
"error"
]
}
]
}커뮤니티
증거