pagerank
Identify the most influential nodes in a graph using PageRank. Returns top-ranked nodes sorted by importance based on link structure.
Instructions
Run PageRank and return the top-k most important nodes.
PageRank assigns every node a score proportional to how many (and how important) other nodes link to it. Higher scores mean more connected / influential nodes.
Use this tool when: you want to find the most important or central nodes in the graph based on link structure. Do NOT use this for: finding similar nodes by content (use vector_search) or for finding shortest paths (use dijkstra).
Args: damping: Probability of following a link vs. teleporting (default 0.85). max_iterations: Upper bound on convergence iterations (default 100). tolerance: Convergence threshold (default 1e-6). top_k: How many top-ranked nodes to return (default 20). The algorithm always scores every node, but only the top-k are returned to keep the output manageable.
Returns: JSON array of {node_id, score, labels, properties} sorted by score descending. Output is truncated if it exceeds the token budget.
Error recovery: If this returns an error, verify the graph is non-empty with graph_info. PageRank requires at least one edge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| damping | No | ||
| max_iterations | No | ||
| tolerance | No | ||
| top_k | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |