read_subgraph
Retrieve the neighborhood of a concept in the knowledge graph, showing direct and indirect connections with configurable depth and direction to identify prerequisites and unlock relationships.
Instructions
Get the neighborhood around a concept for context.
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": {
"center_node": "<center_node>"
},
"name": "read_subgraph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| center_node | Yes | Node ID or concept name to center on | |
| depth | No | How many edge hops to traverse (1=direct connections, 2=neighbors of neighbors) | |
| direction | No | Which edges to follow: - "upstream": Follow edges where center is target (prerequisites) - "downstream": Follow edges where center is source (what it unlocks) - "both": Follow edges in both directions | both |
| include_mastery | No | Whether to include mastery data in response | |
| output_format | No | Output format: - "json": Just the structured data - "mermaid": Just the Mermaid diagram - "both": Both JSON and Mermaid (default) | both |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||