# `pubchem__pubchem_get_compound_interactions`

**Get Compound Interactions**

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.

- 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_interactions`
- 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

- `cid` (integer, required): PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds.
- `kinds` (array, optional): Interaction kinds to fetch. "drug-drug" (interactions with other drugs), "drug-food" (dietary interactions), "target" (binding/activity against molecular targets). Default: \["drug-drug"\]. Default: `["drug-drug"]`.
- `maxEntries` (integer, optional): 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. Default: `10`.
- `offset` (integer, optional): 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 r... 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_interactions
```

```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": {
      "cid": 1
    },
    "name": "pubchem__pubchem_get_compound_interactions"
  }
}
```

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 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.",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "cid": {
        "description": "PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds.",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      },
      "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\"].",
        "items": {
          "enum": [
            "drug-drug",
            "drug-food",
            "target"
          ],
          "type": "string"
        },
        "minItems": 1,
        "type": "array"
      },
      "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.",
        "maximum": 50,
        "minimum": 1,
        "type": "integer"
      },
      "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.",
        "maximum": 2147483646,
        "minimum": 0,
        "type": "integer"
      }
    },
    "required": [
      "cid"
    ],
    "type": "object"
  },
  "name": "pubchem__pubchem_get_compound_interactions",
  "outputSchema": {
    "$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"
        ]
      }
    ],
    "properties": {
      "cid": {
        "description": "PubChem Compound ID.",
        "type": "number"
      },
      "entries": {
        "description": "Interaction entries across the requested kinds.",
        "items": {
          "additionalProperties": false,
          "description": "A single interaction entry.",
          "properties": {
            "kind": {
              "description": "Interaction category.",
              "enum": [
                "drug-drug",
                "drug-food",
                "target"
              ],
              "type": "string"
            },
            "partner": {
              "description": "Interacting compound, food, or target name as the source reports it.",
              "type": "string"
            },
            "source": {
              "description": "Originating source (e.g. \"DrugBank\", \"BindingDB\").",
              "type": "string"
            },
            "text": {
              "description": "The interaction statement.",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "source",
            "text"
          ],
          "type": "object"
        },
        "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"
      },
      "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"
      },
      "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"
      },
      "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"
      },
      "offset": {
        "description": "Zero-based start position read within each requested kind.",
        "type": "number"
      },
      "paging": {
        "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"
      },
      "requestedKinds": {
        "description": "Interaction kinds requested (comma-separated).",
        "type": "string"
      },
      "returnedCount": {
        "description": "Total interaction entries returned across all kinds.",
        "type": "number"
      },
      "truncated": {
        "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"
      }
    },
    "type": "object"
  },
  "title": "Get Compound Interactions"
}
```
