Get CI Relationships
servicenow_get_ci_relationshipsTraverse CMDB CI relationships from a starting item to map upstream dependencies or downstream dependents. Set direction and depth to control traversal scope.
Instructions
Traverse CMDB CI relationships from a starting configuration item. Supports recursive traversal up (dependencies) or down (dependents).
Args:
ci_sys_id (string): sys_id of the starting CI
direction ('up'|'down'|'both'): 'up' = upstream dependencies, 'down' = downstream dependents, 'both' = full graph (default: 'both')
depth (number): How many relationship hops to traverse (1–5, default: 2)
response_format: Output format
Returns: Relationship tree with CI names, types, and relationship types. Visits at most 50 unique CIs to prevent runaway traversal.
Examples:
What does this server depend on? → ci_sys_id="...", direction="up", depth=2
What services use this database? → ci_sys_id="...", direction="down", depth=3
Full dependency map → direction="both", depth=2
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Relationship hops to traverse (1–5, default: 2) | |
| ci_sys_id | Yes | sys_id of the starting CI | |
| direction | No | Traversal direction: up=dependencies, down=dependents, both=full graph | both |
| response_format | No | Output format: 'markdown' (default) for human-readable or 'json' for structured data | markdown |