Graph transitive closure

graph-transitive-closure · version 1.0.0 · Graphs & scheduling · free, no key needed

List directed reachability pairs of path length at least 1, ordered by declared node index.

Use when you need to: graph transitive closure · directed reachability pairs · positive-length reachability pairs.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "nodes": [
    "build",
    "test",
    "package",
    "deploy"
  ],
  "edges": [
    {
      "from": "build",
      "to": "test"
    },
    {
      "from": "test",
      "to": "package"
    },
    {
      "from": "package",
      "to": "deploy"
    },
    {
      "from": "build",
      "to": "package"
    }
  ]
}

Response:

{
  "result": {
    "pairs": [
      {
        "from": "build",
        "to": "test"
      },
      {
        "from": "build",
        "to": "package"
      },
      {
        "from": "build",
        "to": "deploy"
      },
      {
        "from": "test",
        "to": "package"
      },
      {
        "from": "test",
        "to": "deploy"
      },
      {
        "from": "package",
        "to": "deploy"
      }
    ]
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "graph-transitive-closure",
  "version": "1.0.0",
  "input": {
    "nodes": [
      "build",
      "test",
      "package",
      "deploy"
    ],
    "edges": [
      {
        "from": "build",
        "to": "test"
      },
      {
        "from": "test",
        "to": "package"
      },
      {
        "from": "package",
        "to": "deploy"
      },
      {
        "from": "build",
        "to": "package"
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/graph-transitive-closure/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"nodes":["build","test","package","deploy"],"edges":[{"from":"build","to":"test"},{"from":"test","to":"package"},{"from":"package","to":"deploy"},{"from":"build","to":"package"}]}'

The machine-readable contract is at /v1/tools/graph-transitive-closure/versions/1.0.0.

CLI

node cli.mjs run graph-transitive-closure 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.