Get Upstream Nodes
get_upstream_nodesWalk the entire upstream lineage of a node to retrieve all ancestor nodes with their depth, enabling dependency analysis without depth restrictions.
Instructions
Walk the full upstream dependency graph for a node and return every ancestor with its depth level.
Args: workspaceID: Workspace to query nodeID: Starting node whose upstream lineage to trace
Returns: Array of ancestor nodes with nodeID, nodeName, nodeType, and depth (1 = direct parent). Traverses the entire graph with no depth limit. Nodes are deduplicated.
Requires a lineage cache — will fetch all workspace nodes with detail=true on first call (may take a moment for large workspaces). Subsequent calls use the cached graph (default TTL: 30 min).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeID | Yes | Node ID to trace upstream from | |
| workspaceID | Yes | Workspace ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeID | No | ||
| nodeName | No | ||
| nodeType | No | ||
| ancestors | No | ||
| dependents | No | ||
| totalAncestors | No | ||
| totalDependents | No |