Skip to main content
Glama

between

Calculate betweenness centrality to identify critical nodes in system architecture by analyzing shortest path flow through a specified node.

Instructions

Betweenness centrality for a node — what fraction of all shortest paths flow through it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesEN source code describing the system
nodeYesNode to compute betweenness centrality for

Implementation Reference

  • The 'between' tool is defined using server.tool, and its handler function calls the 'callApi' helper to interact with the backend API.
    server.tool(
      "between",
      "Betweenness centrality for a node — what fraction of all shortest paths flow through it.",
      {
        source: z.string().describe("EN source code describing the system"),
        node: z.string().describe("Node to compute betweenness centrality for"),
      },
      async ({ source, node }) => {
        const result = await callApi("between", { source, node });
        return {
          content: [{ type: "text" as const, text: result.text }],
          isError: result.isError,
        };
      }
    );

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/dushyant30suthar/endiagram-mcp'

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