> 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-graph-schema.md).

# get\_graph\_schema — Get graph schema

Get graph schema

Get graph schema

## What it does

Describe the org's knowledge-graph ontology shape — the entity types (classes) it contains and the relationships that connect them, including the subClassOf (SCO) class hierarchy.

**When to use:** the user asks "how is the biology structured / what entity types & relationships exist?"; you need to discover the schema (what classes / relationships exist) before looking entities up; you want the SCO class hierarchy — which class is a subclass of which; you want to know which concepts connect to which, and by what relationship, to plan a query/path.

**When NOT to use:** you want a specific entity instance, not the schema (use search\_entities / get\_entity); you want the detailed property list of ONE class (use describe\_entity\_type).

**Parameters:**

* `rootOnly` — Optional boolean (default false). When true, return only root classes (no SCO subclasses) and only relationships whose endpoints are both root classes — a higher-level overview.

**Returns:** An object { classCount, relationshipCount, classes, relationships }. classCount is the total number of entity types and relationshipCount the total number of relationship edges in the full ontology (these are full-schema totals; rootOnly filters only the arrays below). classes\[] lists each entity type as { dbLabel, displayName, description, parent }: dbLabel is the graph/db label — the Cypher-usable primary key (e.g. 'TranscriptionFactor'), the same value run\_graph\_query / get\_entity\_connections expect; displayName is the human name (e.g. 'Transcription Factor'); description is the class definition; parent is the dbLabel of its subClassOf (SCO) parent (null = a root class), forming the class hierarchy. relationships\[] is the directed concept→concept map keyed by dbLabel: each { from, to, rels } means class 'from' connects to class 'to' via every relationship label in rels\[] (SCO excluded — that hierarchy is in classes). from/to are graph dbLabels, so it maps cleanly to a Cypher pattern (from)-\[:rel]->(to); it is machine-readable JSON (jq-queryable). Use this to learn the schema, then pick the right class/relationship for lookups.

## Parameters

| Parameter  | Type    | Required | Description                                                                                                                                                                       |
| ---------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rootOnly` | boolean | no       | Optional boolean (default false). When true, return only root classes (no SCO subclasses) and only relationships whose endpoints are both root classes — a higher-level overview. |

## Response

```ts
{
  classCount: number;
  relationshipCount: number;
  classes: Array<{
    dbLabel: string;
    displayName: string;
    description: string | null;
    parent: string | null;
  }>;
  relationships: Array<{
    from: string;
    to: string;
    rels: string[];
  }>;
}
```

## Example

```json
// get_graph_schema({})
{}
```

Response (arrays truncated):

```json
{
  "classCount": 71,
  "relationshipCount": 334,
  "classes": [
    {
      "dbLabel": "Allele",
      "displayName": "Allele",
      "description": "One of a set of sequence features known to exist at a particular genomic location. An allele is a seqeunce feature at a genomic location where variation occurs (i.e. where >1 different sequence is kno…",
      "parent": null
    },
    {
      "dbLabel": "Antibody",
      "displayName": "Antibody",
      "description": "antibody expressed within a cell line",
      "parent": null
    },
    {
      "dbLabel": "BiologicalProcess",
      "displayName": "Biological Process",
      "description": "A biological process is the execution of a genetically-encoded biological module or program. It consists of all the steps required to achieve the specific biological objective of the module. A biologi…",
      "parent": null
    },
    "… 68 more"
  ],
  "relationships": [
    {
      "from": "Allele",
      "to": "Gene",
      "rels": [
        "associated gene orthologous to",
        "on target"
      ]
    },
    {
      "from": "Antibody",
      "to": "Gene",
      "rels": [
        "Recombinant expression of"
      ]
    },
    {
      "from": "BiologicalProcess",
      "to": "BiologicalProcess",
      "rels": [
        "is a"
      ]
    },
    "… 90 more"
  ]
}
```
