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
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | EN source code describing the system | |
| node | Yes | Node to compute betweenness centrality for |
Implementation Reference
- src/index.ts:237-251 (handler)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, }; } );