# `pubchem__pubchem_get_bioactivity`

**Get Bioactivity**

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?".

- 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_bioactivity`
- 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.
- `maxResults` (integer, optional): 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. Default: `20`.
- `offset` (integer, optional): 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. Default: `0`.
- `outcomeFilter` (string, optional): Filter by activity outcome. "active" shows only assays where the compound showed activity — most useful for understanding biological profile. Default: "all". One of: `active`, `inactive`, `all`. Default: `all`.
- `targetAccession` (string, optional): 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.
- `targetGeneId` (integer, optional): 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...

## 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_bioactivity
```

```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_bioactivity"
  }
}
```

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 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?\".",
  "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"
      },
      "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.",
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      },
      "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.",
        "maximum": 9007199254740991,
        "minimum": 0,
        "type": "integer"
      },
      "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\".",
        "enum": [
          "active",
          "inactive",
          "all"
        ],
        "type": "string"
      },
      "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"
      },
      "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?\".",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      }
    },
    "required": [
      "cid"
    ],
    "type": "object"
  },
  "name": "pubchem__pubchem_get_bioactivity",
  "outputSchema": {
    "$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"
        ]
      }
    ],
    "properties": {
      "activeCount": {
        "description": "Assays with \"Active\" outcome.",
        "type": "number"
      },
      "cap": {
        "description": "The maxResults cap that was applied.",
        "type": "number"
      },
      "cid": {
        "description": "PubChem Compound ID.",
        "type": "number"
      },
      "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"
      },
      "filteredCount": {
        "description": "Exact number of assays matching the outcome and target filters, across all pages.",
        "type": "number"
      },
      "inactiveCount": {
        "description": "Assays with \"Inactive\" outcome.",
        "type": "number"
      },
      "nextOffset": {
        "description": "Offset to pass on the next call to continue past this page. Omitted when no further assays match.",
        "type": "number"
      },
      "notice": {
        "description": "Recovery guidance when the filter yields no results or the compound has no bioactivity data.",
        "type": "string"
      },
      "offset": {
        "description": "Zero-based index of the first assay returned.",
        "type": "number"
      },
      "outcomeFilter": {
        "description": "Outcome filter applied: active, inactive, or all.",
        "type": "string"
      },
      "results": {
        "description": "Assay results matching the filter.",
        "items": {
          "additionalProperties": false,
          "description": "Assay result entry.",
          "properties": {
            "activityValues": {
              "description": "Quantitative activity measurements.",
              "items": {
                "additionalProperties": false,
                "description": "Quantitative activity measurement entry.",
                "properties": {
                  "name": {
                    "description": "Measurement name (e.g. IC50, EC50, Ki). Omitted when not reported.",
                    "type": "string"
                  },
                  "unit": {
                    "description": "Unit of measurement (e.g. uM, nM). Omitted when not reported.",
                    "type": "string"
                  },
                  "value": {
                    "description": "Measured value.",
                    "type": "number"
                  }
                },
                "required": [
                  "value"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "aid": {
              "description": "PubChem Assay ID.",
              "type": "number"
            },
            "assayName": {
              "description": "Assay name/title.",
              "type": "string"
            },
            "outcome": {
              "description": "Activity outcome: Active, Inactive, Inconclusive, Unspecified.",
              "type": "string"
            },
            "targetAccession": {
              "description": "Target protein accession (UniProt/GenBank).",
              "type": "string"
            },
            "targetGeneId": {
              "description": "Target NCBI Gene ID.",
              "type": "number"
            }
          },
          "required": [
            "aid",
            "assayName",
            "outcome",
            "activityValues"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "returnedCount": {
        "description": "Assays returned on this page.",
        "type": "number"
      },
      "shown": {
        "description": "Assays returned on this page.",
        "type": "number"
      },
      "targetFilter": {
        "description": "Target filter applied (gene ID and/or protein accession), when set.",
        "type": "string"
      },
      "totalAssays": {
        "description": "Total unique assays for this compound.",
        "type": "number"
      },
      "truncated": {
        "description": "True when matching assays remain past this page.",
        "type": "boolean"
      }
    },
    "type": "object"
  },
  "title": "Get Bioactivity"
}
```
