Skip to main content
Glama

util_graph

Read-only

Graph analysis (shortest path, components, centrality) — Analyze any network from an edge list. edges=from,to[,weight];... (directed=true for one-way edges; nodes= adds isolated nodes). Returns density, degrees, connected components (strongly connected + cycle detection + topological order for directed graphs), bipartite check and minimum spanning tree (undirected), diameter/radius/center, average shortest path, top betweenness, closeness, PageRank and degree. from= gives distances to every node; from= + to= gives the shortest path (Dijkstra, or Bellman-Ford with negative weights and negative-cycle detection). Offline; up to 1,000 nodes / 5,000 edges (centrality on smaller graphs). Useful for dependency graphs, routing, org charts, service maps. Price: $0.003 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "edges": "<edges>"
    },
    "name": "util_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
edgesYesA,B,4;B,C,1;A,C,7;C,D,2;D,E,3;B,E,9

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, non-destructive, open-world); the description goes well beyond by disclosing hard limits (1,000 nodes / 5,000 edges, centrality restricted to smaller graphs), algorithm selection behavior, negative-cycle detection, and the x402 USDC cost of $0.003 per call. That is exactly the cost and constraint context an agent needs before invoking.

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?

Front-loaded with purpose followed by output/behavior detail, then limits and price; no filler sentences. It is very dense — a long single paragraph packing return values, algorithms, and pricing — which costs some scannability against a 5.

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?

With no output schema, the description takes on the burden and enumerates the return payload thoroughly (density, degrees, components, cycle detection, topological order, bipartiteness, MST, diameter/radius/center, average path length, centrality rankings). Size limits, cost, and algorithm behavior are all present, leaving nothing essential unstated.

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

Parameters3/5

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

Schema coverage is 100% for the single edges property, so baseline is 3; the description does add real syntax meaning (semicolon-delimited edge list, comma fields, optional weight). However, it also walks through directed=, nodes=, from=, and to= parameters that do not appear in the supplied schema, which could lead an agent to pass arguments the tool may not accept.

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?

Opens with a specific verb-plus-resource framing ("Graph analysis") and immediately enumerates the exact operations offered: shortest path, components, centrality, MST, PageRank. No sibling in the catalog does graph work, so the tool is trivially distinguishable.

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

Usage Guidelines4/5

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

Gives concrete selection rules: use from= for all-node distances, from= plus to= for a single shortest path, and notes Dijkstra vs Bellman-Ford for negative weights. Adds target domains (dependency graphs, routing, org charts, service maps). Stops short of explicit when-not-to-use guidance or named alternatives, so not a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources