Get the org unit / equipment tree
caddis_get_treeFetch the full company tree or a subtree of organizational units, equipment, and devices to understand the hierarchy and ownership.
Instructions
Structural overview of the org-unit hierarchy with the equipment and devices under it. Without orgUnitId, returns the full company tree from the root; with orgUnitId, returns the subtree rooted there. The body is a TOON document with three named tabular sections — org_units[...]{...}:, equipment[...]{...}:, and devices[...]{...}: — each followed by its indented rows. Hierarchy is encoded in the path columns rather than nesting: each org_units row carries parent_id and parent_path (dot-delimited ancestor ids, e.g. "root.1.2"), each equipment row carries parent_org_unit_id and parent_org_unit_path, and each devices row carries equipment_id. Reconstruct the tree by joining on these. Schedules, device input_setup, hardware_info, and other nested config blobs are NOT included here — fetch them via caddis_get_org_unit_schedule, caddis_get_equipment_schedule, caddis_get_equipment, or caddis_get_device when needed.
Responses are TOON-encoded (toonformat.dev) — a token-efficient JSON dialect mixing YAML-style indentation with CSV-style tables. Example:
name: Caddis Co timezone: America/Denver equipment[3]{id,name,tags,current_status.status,current_status.reason_id}: 1,Mill A,"["cnc","critical"]",running,null 2,"Press, Big",null,down,3 3,Lathe C,null,null,null
Object fields:
key: value; nested objects indent their children.Uniform arrays of objects:
field[N]{cols}:followed by N indented comma-separated rows in column order.Nested objects inside table rows are recursively flattened to dotted columns (e.g.
current_status.status,input_setup.cycle.logic); a null parent yieldsnullacross all its dotted columns (see row 3 above).Primitive arrays at object level:
field[N]: a,b,cinline.Arrays inside table cells are JSON-stringified into a single cell value (
JSON.parse()to recover); empty arrays render asnull(see rows 1–3tagscolumn).Strings with commas/colons/quotes/leading whitespace are double-quoted (escapes:
\\,\"); other strings, numbers, booleans, andnullare bare.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orgUnitId | No | Root for the subtree; omit for the full company tree |