Overview
contox_get_tree returns the complete brain hierarchy as a nested tree. This provides a bird's-eye view of the project knowledge structure, showing how contexts are organized, their tiers, states, and types.
This is useful for understanding the overall memory organization before performing operations like approve, deprecate, or compact.
Parameters
This tool takes no parameters.
Return value
Returns a nested JSON tree where each node contains:
| Field | Type | Description |
|---|---|---|
schemaKey | string | Brain schema key |
tier | number | Tier level: 1 (always loaded), 2 (on-demand), 3 (archive) |
state | string | State: draft, approved, or deprecated |
contextType | string | Type: system, reference, or memory |
children | array | Nested child nodes |
Usage examples
Viewing the brain structure
User: Show me the memory structure
Claude calls: contox_get_tree()
Response:
{
"schemaKey": "root",
"tier": 1,
"state": "approved",
"contextType": "system",
"children": [
{
"schemaKey": "root/architecture",
"tier": 1,
"state": "approved",
"contextType": "memory",
"children": []
},
{
"schemaKey": "root/conventions",
"tier": 1,
"state": "approved",
"contextType": "memory",
"children": []
},
{
"schemaKey": "root/scan",
"tier": 2,
"state": "approved",
"contextType": "reference",
"children": [
{
"schemaKey": "root/scan/routes",
"tier": 2,
"state": "draft",
"contextType": "reference",
"children": []
}
]
}
]
}
Notes
- The tree reflects the current state of all contexts, including drafts and deprecated items.
- Only contexts with a
schemaKeyappear in the tree. Contexts without a schemaKey (legacy V1 contexts) are not included. - The tree depth is unlimited — it reflects whatever hierarchy has been created via
contox_populateor manual parent/child relationships.