# `pubchem__pubchem_search_assays`

**Search Assays**

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.

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

- `maxResults` (integer, optional): 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. Default: `50`.
- `offset` (integer, optional): Zero-based index of the first AID to return. Pass the nextOffset from a previous call to read the following page. Default: 0. Default: `0`.
- `targetQuery` (string, required): Target identifier. Examples: "EGFR" (genesymbol), "Epidermal growth factor receptor" (proteinname), "1956" (geneid), "P00533" (proteinaccession).
- `targetType` (string, required): Target identifier type. "genesymbol" and "proteinname" accept text names. "geneid" accepts NCBI Gene IDs. "proteinaccession" accepts UniProt accessions. One of: `genesymbol`, `proteinname`, `geneid`, `proteinaccession`.

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

```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": {
      "targetQuery": "example",
      "targetType": "genesymbol"
    },
    "name": "pubchem__pubchem_search_assays"
  }
}
```

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": "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.",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "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.",
        "maximum": 200,
        "minimum": 1,
        "type": "integer"
      },
      "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.",
        "maximum": 9007199254740991,
        "minimum": 0,
        "type": "integer"
      },
      "targetQuery": {
        "description": "Target identifier. Examples: \"EGFR\" (genesymbol), \"Epidermal growth factor receptor\" (proteinname), \"1956\" (geneid), \"P00533\" (proteinaccession).",
        "type": "string"
      },
      "targetType": {
        "description": "Target identifier type. \"genesymbol\" and \"proteinname\" accept text names. \"geneid\" accepts NCBI Gene IDs. \"proteinaccession\" accepts UniProt accessions.",
        "enum": [
          "genesymbol",
          "proteinname",
          "geneid",
          "proteinaccession"
        ],
        "type": "string"
      }
    },
    "required": [
      "targetType",
      "targetQuery"
    ],
    "type": "object"
  },
  "name": "pubchem__pubchem_search_assays",
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "anyOf": [
      {
        "not": {
          "required": [
            "error"
          ]
        },
        "required": [
          "aids",
          "targetType",
          "targetQuery",
          "totalFound",
          "offset"
        ]
      },
      {
        "required": [
          "error"
        ]
      }
    ],
    "properties": {
      "aids": {
        "description": "PubChem Assay IDs.",
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "cap": {
        "description": "The maxResults cap that was applied.",
        "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. 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"
                ],
                "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"
      },
      "nextOffset": {
        "description": "Offset to pass on the next call to continue past this page. Omitted when no further AIDs match.",
        "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"
      },
      "offset": {
        "description": "Zero-based index of the first AID returned.",
        "type": "number"
      },
      "shown": {
        "description": "AIDs returned on this page.",
        "type": "number"
      },
      "targetQuery": {
        "description": "Target identifier searched.",
        "type": "string"
      },
      "targetType": {
        "description": "Target identifier type used: genesymbol, proteinname, geneid, or proteinaccession.",
        "type": "string"
      },
      "totalFound": {
        "description": "Total AIDs found for this target, across all pages.",
        "type": "number"
      },
      "truncated": {
        "description": "True when matching AIDs remain past this page.",
        "type": "boolean"
      }
    },
    "type": "object"
  },
  "title": "Search Assays"
}
```
