betweenness_centrality
Identify bridge or bottleneck nodes in a graph by computing betweenness centrality. Measures how often a node lies on shortest paths between other node pairs.
Instructions
Compute betweenness centrality for all nodes (Brandes' algorithm).
Betweenness centrality measures how often a node lies on the shortest path between other node pairs. High-betweenness nodes are "bridges" that connect different parts of the graph.
Use this tool when: you want to find bridge or bottleneck nodes. Do NOT use this for: finding the most linked-to nodes (use pagerank) or finding communities (use louvain).
Args: normalized: If True, normalize scores by 2/((n-1)(n-2)) so they fall in [0, 1] (default True). top_k: Number of top-ranked nodes to return (default 20).
Returns: JSON array of {node_id, score, labels, properties} sorted by score descending.
Error recovery: If all scores are 0 the graph may be too small or disconnected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| normalized | No | ||
| top_k | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |