get_hierarchy
Build a hierarchy tree for a VFB term, showing ancestors (parents) and/or descendants (children). Use relationship "part_of" for brain region structure (e.g. "what are the parts of the mushroom body?") and "subclass_of" for cell type hierarchies (e.g. "what types of Kenyon cell are there?"). Descendants are returned as a nested tree for both relationship types. Ancestors are returned as a nested chain, filtered to nervous system terms for part_of. Start with max_depth=1 for direct parents/children, and offer to go deeper if the user wants more detail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | VFB term ID (e.g. FBbt_00005801 for mushroom body, FBbt_00003686 for Kenyon cell) | |
| direction | No | Which direction to explore (default: "both") | both |
| max_depth | No | Number of levels to expand. 1 = direct children/parents only. Higher values go deeper. -1 = full tree (use with caution on broad terms). Default: 1. | |
| relationship | Yes | Type of hierarchy: "part_of" for brain region structure, "subclass_of" for cell type taxonomies |