get_relationships
Retrieve every node connected to a specified node, including relationship types such as calls and imports, to reveal dependencies and code architecture.
Instructions
Get all nodes connected to a given node, with relationship types.
Args: node_id: Node ID to inspect. direction: "out" (this node calls/imports others), "in" (others call/import this), "both". relation_filter: Filter by relation: "calls", "imports", "contains", "implements", "extends". Leave empty for all. project: Project name.
Returns: List of relationships in format: "source --[relation]--> target".
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": {
"node_id": "<node_id>"
},
"name": "get_relationships"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | ||
| project | No | ||
| direction | No | both | |
| relation_filter | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |