Skip to main content
Glama
GrafeoDB

grafeo-mcp

Official
by GrafeoDB

louvain

Detect communities in graphs by grouping densely-connected nodes using modularity optimization. Adjust resolution to control community size.

Instructions

Detect communities using the Louvain modularity-optimization algorithm.

Groups densely-connected nodes into communities. Higher resolution values produce more (smaller) communities; lower values produce fewer (larger) communities.

Use this tool when: you want to discover clusters or groups in the graph. Do NOT use this for: finding paths (use dijkstra) or ranking nodes (use pagerank).

Args: resolution: Resolution parameter (default 1.0). Values > 1 favor smaller communities, values < 1 favor larger ones.

Returns: JSON object with {modularity, num_communities, communities} where communities maps community_id -> list of node summaries. Output is truncated if it exceeds the token budget.

Error recovery: If this returns 0 communities, the graph may have no edges. Check with graph_info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resolutionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite no annotations, the description fully discloses behavior: it explains the effect of the resolution parameter, describes the return object (modularity, num_communities, communities), mentions output truncation due to token budget, and provides error recovery guidance (0 communities may indicate no edges).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (main purpose, usage, args, returns, error recovery). Each sentence adds value, though the returns section is somewhat verbose. Still, it is reasonably concise and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (community detection with one parameter), the description is complete: it explains the algorithm, parameter effect, return format, output truncation, and error handling. No missing information for proper invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'resolution' is fully explained in the description with its default value and impact on community size, compensating for the schema's lack of description (coverage 0%). The explanation adds clear meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it detects communities using the Louvain algorithm. Distinguishes from sibling tools like dijkstra and pagerank by specifying what it is not for, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use this tool ('when you want to discover clusters or groups') and when not to use it, providing specific alternatives (dijkstra for paths, pagerank for ranking). No ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GrafeoDB/grafeo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server