Detect Knowledge Communities
graph_communitiesFind clusters of densely-interconnected entities in a knowledge graph to reveal topic neighbourhoods. Assigns each entity to one community and returns clusters plus coverage stats, without needing GDS or APOC.
Instructions
Find clusters of densely-interconnected entities in the graph. Uses greedy seed-based BFS through edges above the weight threshold — works without GDS or APOC. Each entity is assigned to at most one community (the first that reaches it from a high-degree seed). Useful for understanding knowledge neighbourhoods (e.g. "everything related to infrastructure"). Returns {communities, coverage}. communities holds at most max_communities clusters in seed order (highest-degree seed first), each shaped {id, seed_name, seed_id, member_count, dominant_type, members: [{id, name, type}]} with at most 30 members listed; communities below min_size are left out. coverage is {total_entities, assigned, unassigned}. Use graph_query or graph_search instead when you have a specific entity to start from.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "graph_communities"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_hops | No | BFS depth from each seed (default 3, capped at 4). | |
| min_size | No | Minimum members for a community to be returned (default 2). | |
| max_communities | No | Maximum number of communities to return (default 10). | |
| weight_threshold | No | Only traverse edges with weight strictly greater than this (default 0.4). |