> For the complete documentation index, see [llms.txt](https://docs.biobox.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.biobox.io/guide/how-to/ask-biobox-with-claude/tools/get-concept-relationships.md).

# get\_concept\_relationships — Get ontology relationships over a concept set

Get ontology relationships over a concept set

Get ontology relationships over a concept set

## What it does

List the schema-level, query-eligible relationships over a set of concept types — the hops the ontology allows — to narrow a BxQL path. SCO-inherited and directed (from=subject, to=object).

**When to use:** you have candidate concept dbLabels and need the valid relationships connecting them (mode BETWEEN); you want the neighbouring concepts reachable from a concept, to extend a path (mode ADJACENT).

**When NOT to use:** you need a bridge concept connecting two DISCONNECTED groups — use find\_intermediate\_concept; you want the whole ontology at once — use get\_graph\_schema; you want instance-level neighbours of one node — use get\_entity\_connections.

**Parameters:**

* `dbLabels` — the concept types (graph dbLabels, e.g. \["Gene", "Disease"]). Required.
* `mode` — "BETWEEN" (default; both endpoints in the set) or "ADJACENT" (either endpoint).

**Returns:** An object { relationships, count, truncated }. Each relationship is { type, definition, from, to } where type is the relationship name to use in BxQL, and from/to are concept dbLabels (from=DOMAIN/subject, to=RANGE/object). SCO-inherited + forQL-filtered. `count` is the number returned; `truncated` is true when the list was capped for token size (an ADJACENT query over a hub concept can exceed the cap) — narrow `dbLabels` or use mode BETWEEN if you need the full set.

## Parameters

| Parameter  | Type  | Required | Description                                                                     |
| ---------- | ----- | -------- | ------------------------------------------------------------------------------- |
| `dbLabels` | array | yes      | the concept types (graph dbLabels, e.g. \["Gene", "Disease"]). Required.        |
| `mode`     | enum  | no       | "BETWEEN" (default; both endpoints in the set) or "ADJACENT" (either endpoint). |

## Response

```ts
{
  relationships: Array<{
    type: string;
    definition: string | null;
    from: string;
    to: string;
  }>;
  count: number;
  truncated: boolean;
}
```

## Example

```json
// get_concept_relationships({"dbLabels":["Gene","Disease"],"mode":"BETWEEN"})
{
  "dbLabels": [
    "Gene",
    "Disease"
  ],
  "mode": "BETWEEN"
}
```

Response (arrays truncated):

```json
{
  "relationships": [
    {
      "type": "is marker for onset of",
      "definition": "Relationship from datapack alliance_disease_gene",
      "from": "Gene",
      "to": "Disease"
    },
    {
      "type": "has genetic association",
      "definition": "Relationship from datapack hpoa",
      "from": "Gene",
      "to": "Disease"
    },
    {
      "type": "is marker for",
      "definition": "Relationship from datapack alliance_disease_gene",
      "from": "Gene",
      "to": "Disease"
    },
    "… 29 more"
  ],
  "count": 32,
  "truncated": false
}
```
