# Graph Algorithms – Kruskal Minimum Spanning Tree

> Graph Algorithms – Kruskal Minimum Spanning Tree is a paid API for AI agents from graph-algorithms.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Computes the minimum spanning tree (or spanning forest if disconnected) of an undirected weighted edge list using Kruskal's algorithm.

## Facts

- Endpoint: GET https://graph-algorithms.x402tookit.com/minimum-spanning-tree?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/graph-algorithms-kruskal-minimum-spanning-tree-a8186c31
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_du6Ev9dTNkhcrJev51B1b

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability graph-algorithms-kruskal-minimum-spanning-tree-a8186c31
```

Example prompt: Find the minimum spanning tree for this network: A,B,4; A,C,2; B,C,1; B,D,5; C,D,8; C,E,10; D,E,2 — I need to know which edges are in the MST and the total weight.

## When to prefer this

Use this endpoint when you need the globally optimal minimum spanning tree or spanning forest for an undirected weighted graph, especially for network design, clustering, or cost minimization problems. Prefer this over shortest-path endpoints (Dijkstra, Bellman-Ford) when the goal is connecting all nodes at minimum total cost rather than finding the fastest route between two specific nodes. Choose this over Floyd-Warshall when you need spanning connectivity rather than all-pairs distances.

## Known failure modes

- More than 200 unique nodes — request rejected with node cap error
- More than 1000 edges — request rejected with edge cap error
- Edge string exceeds 60000 characters — payload too large
- Malformed edge format (e.g. missing separator or invalid node name characters) — parse error returned
- Node names containing characters outside allowed set (letters, digits, _ . : + -) — validation error

## How this service works

Kruskal minimum spanning tree of an undirected weighted edge list; returns a spanning forest if disconnected.

## Output

Returns a list of tree edges (from, to, weight) forming the minimum spanning tree or spanning forest, along with the total MST weight, number of nodes and edges processed, number of connected components, tree edge count, and count of skipped self-loops. Also includes a summary string and any degradation notices.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "edges"
     ],
     "properties": {
      "edges": {
       "type": "string",
       "description": "Edges separated by ; or newline, each 'from,to' or 'from,to,weight' (default weight 1), or a JSON array of [from,to,weight]; up to 200 nodes, 1000 edges, 60000 characters; node names 1-32 characters of letters, digits, _ . : + -. Edges are undirected"
      },
      "nodes": {
       "type": "string",
       "description": "Optional extra node names (comma or space separated) so isolated nodes are counted; the total still counts toward the 200-node cap"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "edgeCount": {
       "type": [
        "null",
        "number"
       ]
      },
      "nodeCount": {
       "type": [
        "null",
        "number"
       ]
      },
      "treeEdges": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "to": {
          "type": [
           "null",
           "string"
          ]
         },
         "from": {
          "type": [
           "null",
           "string"
          ]
         },
         "weight": {
          "type": [
           "null",
           "number"
          ]
         }
        }
       }
      },
      "com
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/graph-algorithms-kruskal-minimum-spanning-tree-a8186c31/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from graph-algorithms.x402tookit.com](https://www.zero.xyz/host/graph-algorithms.x402tookit.com/llms.txt)
