kb_graph
Traverse requirements, scenarios, tests, and code symbols from seed IDs to see how entities connect. Follows curated link types up to depth, node, or edge limits and flags truncated results.
Instructions
Run bounded graph traversal from one or more seed IDs across curated relationship types and return the nodes and edges reached. Use it to follow links from IDs you already have, such as a requirement to its scenarios and tests or a symbol to the requirements it implements; use kb_query to find entities by filter and kb_search to ask a question. Traversal stops at depth, maxNodes or maxEdges and then sets truncated. No mutation side effects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Number of hops from the seeds. | |
| seedIds | Yes | Entity IDs to start from, for example REQ-... or SCEN-.... Seeds are always returned as nodes. | |
| maxEdges | No | Stop and set truncated once this many edges are reached. | |
| maxNodes | No | Stop and set truncated once this many nodes are reached. | |
| direction | No | outgoing follows links from each node, incoming follows links pointing at it, both does either. | |
| entityTypes | No | Keep only nodes of these types (req, scenario, test, adr, flag, event, symbol, fact) in the result, and the edges between them. Traversal still passes through other types. | |
| relationships | No | Relationship types to follow, for example specified_by, verified_by or implements. Omit to follow every relationship type. | |
| workspaceRoot | No | Optional absolute path of the workspace this call is about when it differs from the one the server started in, for example the git worktree you are working in. The server answers from that workspace's knowledge base when it is a worktree of the same repository or lies under the client's MCP roots; otherwise it answers from its own workspace and adds a workspace_mismatch diagnostic. Host hooks fill this in automatically where available. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error | No | ||
| status | Yes | ||
| effects | Yes | ||
| operation | Yes | ||
| diagnostics | Yes | ||
| nextActions | Yes | ||
| kibiProtocol | Yes | ||
| resultVersion | Yes |