Skip to main content
Glama
GrafeoDB

grafeo-mcp

Official
by GrafeoDB

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

TableJSON Schema
NameRequiredDescriptionDefault
normalizedNo
top_kNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description explains the algorithm, output format (sorted JSON array with score, labels, properties), and error recovery advice. While it does not explicitly state it is read-only, it is implied and there are no contradictions with annotations (none provided). A slight improvement could be an explicit 'no side effects' statement.

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?

The description is relatively concise and front-loaded with purpose, but the long algorithmic line and Args block could be slightly more structured. Nonetheless, it is well-organized and efficient.

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 lack of annotations and minimal schema, the description covers algorithm, parameters, output format, and error recovery, making it fully complete for the tool's purpose.

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?

Input schema has 0% description coverage, but the description compensates by explaining 'normalized' (normalization formula, default True) and 'top_k' (number of top-ranked nodes, default 20), providing essential meaning that the schema lacks.

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?

The description clearly states it computes betweenness centrality using Brandes' algorithm, defines what it measures (bridge/bottleneck nodes), and distinguishes it from sibling tools like pagerank and louvain, making the purpose specific and 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?

It explicitly provides 'Use this tool when' and 'Do NOT use this for' with concrete alternatives (pagerank, louvain), offering clear context for when to and when not to use the tool.

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