kernel_graph_slice
Extract a read-only slice of the main graph via Cypher, returning nodes, relationships or paths into a scratch graph or JSON for sandboxed agents and files.
Instructions
Take a slice of Kernl's main graph with a READ-ONLY query that returns nodes, relationships or paths (e.g. MATCH p = (:Person {name: $n})-[*1..2]-() RETURN p), checked like kernel_graph_query. into: "scratch" (default) copies it into your scratch graph, keeping labels and properties, with _src set to the original's element id; into: "json" returns it as nodes and relationships, for a sandboxed agent or a file. Embeddings are left out.
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": {
"cypher": "<cypher>"
},
"name": "kernel_graph_slice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| into | No | scratch | |
| rows | No | Most rows the query may return. | |
| cypher | Yes | ||
| params | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||