kernel_graph_analyze
Computes pagerank, communities, components, or betweenness on selected labels and writes the scores to nodes. Use the results in graph queries to rank central nodes, group communities, or find bridges.
Instructions
Graph analytics over the labels you name (and, optionally, only some relationship types): pagerank (who is central), communities (Louvain groups), components (what is connected at all), betweenness (who bridges groups). The result is written on each node as pageRank (pagerank), communityId (communities), componentId (components), betweenness (betweenness) — use it afterwards in kernel_graph_query, e.g. ORDER BY p.pageRank DESC. Runs on Graph Data Science when the graph has it or GDS_REMOTE_URI points at one (only numbered nodes and edges are sent), otherwise in the kernel, up to 200000 nodes.
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": {
"algorithm": "<algorithm>",
"labels": "<labels>"
},
"name": "kernel_graph_analyze"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| write | No | Write the result on the nodes. | |
| engine | No | auto | |
| labels | Yes | Node labels to include, e.g. ["Person"]. | |
| algorithm | Yes | ||
| relationships | No | Relationship types to follow; all by default. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||