Get CMDB Relationships
get_cmdb_relationshipsGet direct CMDB CI relationships for impact analysis and dependency mapping. Retrieve upstream, downstream, or both relationship directions to understand CI topology.
Instructions
Get direct relationships of a CMDB Configuration Item (CI). Returns upstream, downstream, or both relationship directions. Use this for impact analysis, dependency mapping, and understanding CI topology.
Provide the CI sys_id (from cmdb_ci or any CI class table). Optionally filter by relationship type (e.g., 'Depends on::Used by', 'Contains::Contained by').
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ci_sys_id": "<ci_sys_id>"
},
"name": "get_cmdb_relationships"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of relationships to return. Default is 100. | |
| 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 Configuration Item to get relationships for. | |
| direction | No | Relationship direction: "upstream" (parents/dependencies), "downstream" (children/dependents), or "both". Default is "both". | both |
| relation_type | No | Filter by relationship type name (e.g., "Depends on::Used by", "Contains::Contained by"). If omitted, returns all relationship types. |