chembl-get-bioactivities
chembl_get_bioactivitiesThe flagship compound↔target bioactivity bridge: measurements for a molecule (target deconvolution / selectivity), a target (lead finding), or both together (how potently one compound hits one target). Supply at least one of molecule_chembl_id (from chembl_search_molecules) or target_chembl_id (from chembl_search_targets) — supplying both narrows to that compound–target pair, supplying neither is an error. A drug's measurements are often split across its salts and other alternate forms, so molecule_chembl_id reads that one form unless include_alternate_forms widens it to the whole family under its parent (a salt's ID included), every view, page, and spill reading the same family. Filter by standard_type (IC50/Ki/EC50/…), minimum potency pchembl_value_min, assay_type, organism, and variant (wild type, or one recorded mutant such as "T315I"). Each row carries its activity_comment and data_validity_comment, its assay variant, its source document for citation, its family parent_molecule_chembl_id (merge a drug with its salts on it), ChEMBL's potential_duplicate flag for repeat citations, and its assay format (bao_label). Not every measurement has a derivable pchembl_value, so potency_view picks which side of that split you get: the default "potency_ranked" returns the measurements that have one, most potent first (ChEMBL sorts the rest first otherwise, which is why they are not merged), and "null_potency" returns exactly the measurements that have none. totalCount is the honest full match count across both views either way. Mixing measurement types (IC50 vs Ki) is a scientific error — set standard_type to compare like with like. A popular target carries tens of thousands of rows: results spill to a DataCanvas table (call chembl_dataframe_describe for its columns, then chembl_dataframe_query for honest aggregates across the staged set), while an inline preview answers the immediate question. Each view stages its own table (bioactivities / bioactivities_null_potency), so running both against one canvas_id lets a UNION ALL rebuild the full set. A canvas is minted only when a view spills; pass its canvas_id back and every later non-cursor call re-stages the table of its view with its own rows, even when they fit inline or none match, so a successful call never leaves rows from an earlier query in it, and a spill that fails or is cancelled leaves the earlier table in place. The spill is bounded by a row cap (CHEMBL_MAX_SPILL_ROWS) and a time budget (CHEMBL_SPILL_DEADLINE_MS); when either stops it short of the view, truncated is true, truncated_by names the bound, and the table is a bounded slice, not the complete view. The inline rows are always capped at limit, so compare that against totalCount before treating them as the whole answer. Spilling needs the canvas, which is on unless the server sets CANVAS_PROVIDER_TYPE=none. Whenever a call stages nothing and rows remain past this page — the canvas is off, or the view fit inline with no canvas_id — nextCursor continues the view: pass it back as cursor, with the same filters and potency_view, for the next page. A cursor page is always returned inline and never staged, canvas or not.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "chembl_get_bioactivities"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows in the inline preview or cursor page, up to 1000 — a larger value is served at 1000, with a notice saying so. Defaults to the server default (25). With the canvas enabled, a view that spills still stages in full whatever the limit; when a call stages nothing, nextCursor reaches the rows past limit. | |
| cursor | No | Opaque continuation token from a previous call's nextCursor — resumes the view where that page ended. Omit for the first page. Re-send the same molecule_chembl_id/target_chembl_id, include_alternate_forms, filters, and potency_view that minted it (only limit may change; it sets this page's size); redeeming it against different filters walks a different result set. A cursor page is returned inline and never staged, even with the canvas enabled. | |
| variant | No | Restrict to one assay variant of the target. "wild_type" keeps the measurements that record no variant. Any other value keeps those whose recorded assay_variant_mutation equals it whole, case-insensitively, with spaces beside "," or "/" ignored: a substitution ("T315I"), a deletion ("F508del"), a multi-mutant in the order ChEMBL records it ("L858R,T790M"; "T790M,L858R" matches nothing, and "L858R" alone matches only the single mutant), or "UNDEFINED MUTATION" for an unspecified mutant. Read assay_variant_mutation on unfiltered rows for the recorded strings. | |
| organism | No | Restrict to a target organism, e.g. "Homo sapiens" (case-insensitive exact match). | |
| canvas_id | No | Optional canvas ID from a prior call to reuse the same canvas. With it, the call re-stages the selected potency_view's table with this call's rows whether they spill, fit inline, or are empty, so a second query of the SAME view REPLACES (overwrites) its prior rows once it succeeds — it does not append, and a spill that fails or is cancelled leaves them — while the other view's table is left intact, which is what lets both coexist on one canvas. Omit it and a fresh canvas is minted only if the view spills. Left untouched on a cursor page, which never stages. | |
| assay_type | No | Restrict to an assay type code: "B" (binding), "F" (functional), "A" (ADMET), "T" (toxicity), "P" (physicochemical), "U" (unassigned). | |
| potency_view | No | Which side of the pchembl_value presence split to retrieve. "potency_ranked" (default) returns the measurements that have a derivable pchembl_value, most potent first. "null_potency" returns exactly the measurements that have none — the rows the ranked view excludes, otherwise unreachable. The two partition the match set and stage to separate canvas tables. | potency_ranked |
| standard_type | No | Restrict to one measurement type, e.g. "IC50", "Ki", "EC50". Matched exactly, case included — ChEMBL records distinct types that differ only by case, such as "Kd" and "KD". Set this to compare potencies validly. | |
| target_chembl_id | No | ChEMBL target ID (from chembl_search_targets), e.g. "CHEMBL203". Supply this, molecule_chembl_id, or both — both narrows to that compound–target pair. | |
| pchembl_value_min | No | Minimum pchembl_value (−log10 molar potency), e.g. 7 keeps sub-100 nM activities. Only valid on the potency_ranked view — the null_potency rows have no pchembl_value to compare against. | |
| molecule_chembl_id | No | ChEMBL molecule ID (from chembl_search_molecules), e.g. "CHEMBL941". Supply this, target_chembl_id, or both — both narrows to that compound–target pair. | |
| include_alternate_forms | No | Widen molecule_chembl_id to its whole family: the parent it belongs to and every salt and other alternate form ChEMBL files under it (a drug's measurements are often split across them). A salt's ID reaches its parent's family; each row keeps the molecule_chembl_id of the form it was measured on. Requires molecule_chembl_id; combines with target_chembl_id and every filter. Defaults to false: that one form's measurements only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Guidance when no measurements matched (naming the spelling ChEMBL records when the standard_type sent differs from it only by case), how to SQL the staged set, or which rows of the view an inline page holds and how to continue it — led by the disclosure that a limit above the maximum was served at the maximum. | |
| spilled | No | True when the view exceeded the inline preview and spilled to the canvas. False when it fit inline — including an inline fit re-staged on a supplied canvas_id, which table_name and staged_row_count report. | |
| canvas_id | No | Canvas ID holding the staged table — pass to chembl_dataframe_describe to list its columns, then to chembl_dataframe_query to run SQL over them. Null when nothing was staged: canvas disabled, a cursor page, or an inline fit with no canvas_id supplied. | |
| truncated | No | True when a bound stopped the page walk short of the view — the CHEMBL_MAX_SPILL_ROWS row cap or the CHEMBL_SPILL_DEADLINE_MS time budget, as truncated_by says. The staged table is then a bounded slice, NOT the complete view, so aggregates over it are a sample. Narrow the filters to bring the view under the bound. | |
| activities | No | Bioactivity rows for the selected potency_view — the inline preview, the cursor page, or the full view when it fit without spilling. | |
| nextCursor | No | Opaque token for the next page of this view — pass it back as cursor with the same filters and potency_view. Minted only when nothing was staged and rows remain past this page: with the canvas disabled, on a cursor page, or when the view fit inline with no canvas_id supplied. Absent on the last page and whenever the call staged a table (a spill, or an inline fit re-staged on a supplied canvas_id). | |
| table_name | No | Canvas table name holding the staged rowset, and the FROM target for chembl_dataframe_query SQL — "bioactivities" for potency_ranked, "bioactivities_null_potency" for null_potency. Null when nothing was staged. | |
| totalCount | No | Total matching measurements upstream — the honest full count spanning BOTH potency views, before any preview cap. The staged/preview rows are the selected view of this. | |
| potency_view | No | Which view these rows came from: "potency_ranked" = measurements with a derivable pchembl_value; "null_potency" = measurements with none. Re-call with the other value to reach the rest of totalCount. | |
| truncated_by | No | The bound that cut the staged table short when truncated is true: "row_cap" — the CHEMBL_MAX_SPILL_ROWS cap; "time_budget" — the CHEMBL_SPILL_DEADLINE_MS budget ended the page walk, at its expiry or once what was left would not hold another page, so a re-call can stage more. Null when truncated is false. | |
| appliedFilters | No | Filters as the server parsed them. | |
| canvasDisabled | No | True when the server runs with the canvas off (CANVAS_PROVIDER_TYPE=none), so large sets could not spill — the inline rows are one page of the view, not the full set, and nextCursor continues it. | |
| staged_row_count | No | Rows actually registered on the canvas table — 0 when a re-staged view matched nothing. Null when nothing was staged. Below the view total when truncated is true. |