Traverse CMDB Graph
traverse_cmdb_graphTraverse the CMDB relationship graph from a Configuration Item to discover dependencies for impact analysis and service mapping. Supports directional and depth-limited exploration up to 5 levels.
Instructions
Traverse the CMDB relationship graph starting from a Configuration Item using breadth-first search. Returns all nodes (CIs) and edges (relationships) discovered up to the specified depth.
Use this for deep impact analysis, service mapping, and understanding the full dependency chain of a CI. Max depth is 5, max nodes is 1000.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | The ServiceNow instance auth alias (e.g., "myinstance", "prod"). If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| ci_sys_id | Yes | The sys_id of the root Configuration Item to start traversal from. | |
| direction | No | Traversal direction: "upstream", "downstream", or "both". Default is "both". | both |
| max_depth | No | Maximum traversal depth (1-5). Higher depth discovers more of the graph but makes more API calls. Default is 2. | |
| relation_type | No | Filter traversal to only follow this relationship type. | |
| max_nodes | No | Maximum number of nodes to visit. Traversal stops when this limit is reached. Default is 200, max is 1000. |