Skip to main content
Glama

Get Compound Interactions

pubchem_get_compound_interactions
Read-onlyIdempotent

Get a compound's interaction data: drug-food interactions, and the molecular targets its bioassays name — one entry per target as kinds defines it, with its assay counts by outcome and its most potent active value among the potency measurements (IC50, EC50, AC50, GI50, CC50, LC50, Ki, Kd, Potency): Active targets with such a value first, most potent first, then the other Active targets, then the rest. Each entry carries its originating source. Results are paged per kind, with the record total and the next offset reported for each. Drug-food coverage is richest for approved drugs; target covers any compound PubChem has assay data for, and pubchem_get_bioactivity lists one target's assays when given the entry's GeneID or accession. Drug-drug interactions (DrugBank) are unavailable while PubChem's SDQ service refuses automated requests: an explicit drug-drug request is reported in failedKinds while the other kinds still return.

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": {
      "cid": "<cid>"
    },
    "name": "pubchem_get_compound_interactions"
  }
}

Input Schema

NameRequiredDescriptionDefault
cidYesPubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds.
kindsNoInteraction kinds to fetch. "drug-food" (dietary interactions, from PUG View), "target" (molecular targets from the compound's assay summary: one entry per Gene ID with the accessions the table pairs with it, and one per identifier it never pairs, so a Gene ID and an accession that no row pairs are separate entries even when they name the same protein), "drug-drug" (interactions with other drugs, from PubChem's SDQ service, which refuses automated requests, so it is reported in failedKinds). Default: ["drug-food"].
offsetNoZero-based start position within each requested kind, counted in records (molecular targets, for target) 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.
maxEntriesNoMax entries per kind per page. The per-call cap is 50: a larger value (up to 1000) reads a page of 50 per kind and is reported in cappedInputs. Well-studied drugs have a long tail of interactions; use offset to reach the ones past this page. Default: 10.

Output Schema

NameRequiredDescriptionDefault
cidNoPubChem Compound ID.
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when a kind failed, when PubChem has no record for the CID (told apart only when drug-food is requested and answers), when no interaction data was found, when the offset runs past every requested kind, when target names could not be retrieved, or when further pages remain. Absent when this page is complete and every kind resolved.
offsetNoZero-based start position read within each requested kind.
pagingNoPer-kind page position, one entry per requested kind that was retrieved. A kind listed in failedKinds is absent — its position is unknown, not exhausted.
entriesNoInteraction entries across the requested kinds.
truncatedNoTrue 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.
nextOffsetNoOffset 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.
failedKindsNoInteraction kinds that could not be retrieved (comma-separated). The returned entries cover the kinds that succeeded. The notice says, per failed kind, whether a retry can help: a timeout, rate limit, network error, unreadable response, or upstream 5xx other than 501 can clear, while an HTTP 400, 403, or 501, a response in a shape the server does not expect, or a refusal from PubChem's SDQ service (drug-drug) does not.
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.
returnedCountNoTotal interaction entries returned across all kinds.
requestedKindsNoInteraction kinds requested (comma-separated).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / entries / items / properties / text / description
      Previous value: -"The interaction statement. For a target: the assays naming it by outcome and its most potent Active value with that AID, in µM."New value: +"The interaction statement. For a target: the assays naming it by outcome, then its most potent active value with that AID, in µM — the lowest value from an Active row among the potency measurements (IC50, EC50, AC50, GI50, CC50, LC50, Ki, Kd, Potency; names matched whole, in any case). A target whose Active rows carry none of these names its lowest active value outside the potency measurements instead (a rate constant, a plasma level, an unnamed value), and ranks after every target with a potency value."
  2. Changed1 schema field changed
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when a kind failed, when no interaction data was found, when the offset runs past every requested kind, when target names could not be retrieved, or when further pages remain. Absent when this page is complete and every kind resolved."New value: +"Guidance when a kind failed, when PubChem has no record for the CID (told apart only when drug-food is requested and answers), when no interaction data was found, when the offset runs past every requested kind, when target names could not be retrieved, or when further pages remain. Absent when this page is complete and every kind resolved."
  3. Changed1 schema field changed
    • changedOutput schema / properties / failedKinds / description
      Previous value: -"Interaction kinds that could not be retrieved (comma-separated). The returned entries cover the kinds that succeeded. The notice says, per failed kind, whether a retry can help: a timeout or upstream error can clear, while a refusal from PubChem's SDQ service (drug-drug) does not."New value: +"Interaction kinds that could not be retrieved (comma-separated). The returned entries cover the kinds that succeeded. The notice says, per failed kind, whether a retry can help: a timeout, rate limit, network error, unreadable response, or upstream 5xx other than 501 can clear, while an HTTP 400, 403, or 501, a response in a shape the server does not expect, or a refusal from PubChem's SDQ service (drug-drug) does not."
  4. Changed9 schema fields changed
    • changedInput schema / properties / kinds / default
      Previous value: -[
      -  "drug-drug"
      -]New value: +[
      +  "drug-food"
      +]
    • changedInput schema / properties / kinds / description
      Previous value: -"Interaction kinds to fetch. \"drug-drug\" (interactions with other drugs), \"drug-food\" (dietary interactions), \"target\" (binding/activity against molecular targets). \"drug-drug\" and \"target\" come from PubChem's SDQ service, which can refuse automated requests; \"drug-food\" comes from PUG View. Per-target activity is also available from pubchem_get_bioactivity. Default: [\"drug-drug\"]."New value: +"Interaction kinds to fetch. \"drug-food\" (dietary interactions, from PUG View), \"target\" (molecular targets from the compound's assay summary: one entry per Gene ID with the accessions the table pairs with it, and one per identifier it never pairs, so a Gene ID and an accession that no row pairs are separate entries even when they name the same protein), \"drug-drug\" (interactions with other drugs, from PubChem's SDQ service, which refuses automated requests, so it is reported in failedKinds). Default: [\"drug-food\"]."
    • changedInput schema / properties / offset / description
      Previous value: -"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."New value: +"Zero-based start position within each requested kind, counted in records (molecular targets, for target) 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."
    • changedOutput schema / properties / entries / items / properties / partner / description
      Previous value: -"Interacting compound, food, or target name as the source reports it."New value: +"Interacting compound as the source reports it. For a target: its gene or protein name and organism, then the identifier pubchem_get_bioactivity filters on (GeneID:N → targetGeneId, accession:X → targetAccession); the identifier alone when no name resolves. A target whose identifiers join several Gene IDs is named by the accession they share and says \"group of N Gene IDs\"."
    • changedOutput schema / properties / entries / items / properties / source / description
      Previous value: -"Originating source (e.g. \"DrugBank\", \"BindingDB\")."New value: +"Originating source (e.g. \"DrugBank\", \"PubChem BioAssay\")."
    • changedOutput schema / properties / entries / items / properties / text / description
      Previous value: -"The interaction statement."New value: +"The interaction statement. For a target: the assays naming it by outcome and its most potent Active value with that AID, in µM."
    • changedOutput schema / properties / failedKinds / description
      Previous value: -"Interaction kinds that could not be retrieved (comma-separated). The returned entries cover the kinds that succeeded. The notice says, per failed kind, whether a retry can help: a timeout or upstream error can clear, while a refusal from PubChem's SDQ service (drug-drug, target) does not."New value: +"Interaction kinds that could not be retrieved (comma-separated). The returned entries cover the kinds that succeeded. The notice says, per failed kind, whether a retry can help: a timeout or upstream error can clear, while a refusal from PubChem's SDQ service (drug-drug) does not."
    • changedOutput schema / properties / notice / description
      Previous value: -"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."New value: +"Guidance when a kind failed, when no interaction data was found, when the offset runs past every requested kind, when target names could not be retrieved, or when further pages remain. Absent when this page is complete and every kind resolved."
    • changedOutput schema / properties / paging / items / properties / totalRecords / description
      Previous value: -"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."New value: +"Records available for this kind, across all pages: interaction records for drug-drug and drug-food, molecular targets for target. Entries are derived from these records and can be fewer: a drug-drug record carrying no statement yields nothing. Pages divide the records, not the entries."
  5. Changed6 schema fields changed
    • changedInput schema / properties / cid / maximum
      Previous value: -9007199254740991New value: +2147483647
    • changedInput schema / properties / kinds / description
      Previous value: -"Interaction kinds to fetch. \"drug-drug\" (interactions with other drugs), \"drug-food\" (dietary interactions), \"target\" (binding/activity against molecular targets). Default: [\"drug-drug\"]."New value: +"Interaction kinds to fetch. \"drug-drug\" (interactions with other drugs), \"drug-food\" (dietary interactions), \"target\" (binding/activity against molecular targets). \"drug-drug\" and \"target\" come from PubChem's SDQ service, which can refuse automated requests; \"drug-food\" comes from PUG View. Per-target activity is also available from pubchem_get_bioactivity. Default: [\"drug-drug\"]."
    • changedInput schema / properties / maxEntries / description
      Previous value: -"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."New value: +"Max entries per kind per page. The per-call cap is 50: a larger value (up to 1000) reads a page of 50 per kind and is reported in cappedInputs. Well-studied drugs have a long tail of interactions; use offset to reach the ones past this page. Default: 10."
    • changedInput schema / properties / maxEntries / maximum
      Previous value: -50New value: +1000
    • addedOutput schema / properties / cappedInputs
      Added value: +{
      +  "description": "Inputs that asked for more than their per-call cap, with the value requested and the value served. An ID batch lists the IDs past the cap in unprocessed. Omitted when every input was within its cap.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One input served at its per-call cap.",
      +    "properties": {
      +      "input": {
      +        "description": "Input name, e.g. \"maxResults\" or \"cids\".",
      +        "type": "string"
      +      },
      +      "requested": {
      +        "description": "Value requested: the page size, or the number of IDs in the batch.",
      +        "type": "number"
      +      },
      +      "served": {
      +        "description": "Value served: the per-call cap.",
      +        "type": "number"
      +      },
      +      "unprocessed": {
      +        "description": "ID batches only: IDs past the cap, listed in unprocessed in input order.",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "input",
      +      "requested",
      +      "served"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / failedKinds / description
      Previous value: -"Interaction kinds that could not be retrieved (comma-separated). The returned entries cover the kinds that succeeded; retry to re-attempt the failed ones."New value: +"Interaction kinds that could not be retrieved (comma-separated). The returned entries cover the kinds that succeeded. The notice says, per failed kind, whether a retry can help: a timeout or upstream error can clear, while a refusal from PubChem's SDQ service (drug-drug, target) does not."
  6. Changed2 schema fields changed
    • removedInput schema / properties / cid / exclusiveMinimum
      Removed value: -0
    • addedInput schema / properties / cid / minimum
      Added value: +1
  7. Changed7 schema fields changed
    • 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": [
      +      "cid",
      +      "entries",
      +      "paging",
      +      "requestedKinds",
      +      "returnedCount",
      +      "truncated",
      +      "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.",
      +          "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"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "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.",
      +  "type": "boolean"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "cid",
      -  "entries",
      -  "paging",
      -  "requestedKinds",
      -  "returnedCount",
      -  "offset"
      -]
  8. Changed7 schema fields changed
    • changedInput schema / properties / maxEntries / description
      Previous value: -"Max entries per kind (1-50). Well-studied drugs have a long tail of interactions. Default: 10."New value: +"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."
    • addedInput schema / properties / offset
      Added value: +{
      +  "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.",
      +  "maximum": 2147483646,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / nextOffset
      Added value: +{
      +  "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"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when no interaction data was found for the requested kinds."New value: +"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."
    • addedOutput schema / properties / offset
      Added value: +{
      +  "description": "Zero-based start position read within each requested kind.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / paging
      Added value: +{
      +  "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.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Page position for one interaction kind.",
      +    "properties": {
      +      "kind": {
      +        "description": "Interaction category this page covers.",
      +        "enum": [
      +          "drug-drug",
      +          "drug-food",
      +          "target"
      +        ],
      +        "type": "string"
      +      },
      +      "nextOffset": {
      +        "description": "Offset to pass on the next call to continue this kind past the current page. Omitted when no records remain.",
      +        "type": "number"
      +      },
      +      "returnedCount": {
      +        "description": "Interaction entries returned for this kind.",
      +        "type": "number"
      +      },
      +      "totalRecords": {
      +        "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.",
      +        "type": "number"
      +      },
      +      "truncated": {
      +        "description": "True when source records remain for this kind past the current page.",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "returnedCount",
      +      "totalRecords",
      +      "truncated"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "cid",
      -  "entries",
      -  "requestedKinds",
      -  "returnedCount"
      -]New value: +[
      +  "cid",
      +  "entries",
      +  "paging",
      +  "requestedKinds",
      +  "returnedCount",
      +  "offset"
      +]
  9. Changed1 schema field changed
    • removedOutput schema / properties / entries / items / properties / severity
      Removed value: -{
      -  "description": "Raw severity as the source reports it — not normalized across sources, and frequently unset (most sources embed severity in the statement text).",
      -  "type": "string"
      -}
  10. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld/idempotent annotations: documents entry ordering (Active-with-potency first, most potent first, then other Active, then rest), per-kind paging with record totals and next offset, source attribution per entry, and the SDQ outage degraded-response behavior. These are operational facts an agent cannot infer from schema or annotations.

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-loads the purpose and keeps every sentence load-bearing, but the single dense block covering ordering, paging, coverage, sibling routing, and the SDQ outage is hard to scan. It is information-rich rather than padded, so only a mild deduction.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a multi-kind, paged, open-world query tool with an output schema present, the description covers the things the schema does not: ordering rules, degraded drug-drug behavior, differing coverage between approved drugs and any assayed compound, and how to page safely across asynchronous kinds.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already explains kinds, offset paging across kinds, and the 50-entry cap behavior. The description restates paging and kind semantics rather than adding new parameter-level detail, so it lands at the high-coverage baseline.

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 ("Get a compound's interaction data") and enumerates the kinds of data returned (drug-food, assay-derived molecular targets) with per-target detail. It distinguishes itself from pubchem_get_bioactivity by naming that tool and its narrower use case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: use this for compound-level interaction summaries, use pubchem_get_bioactivity when you have a GeneID/accession and want one target's assays. It also states drug-drug is currently unavailable and will be reported in failedKinds while other kinds still return, so the agent knows the call partially succeeds rather than failing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.