Schedule critical path

schedule-critical-path · version 1.0.0 · Graphs & scheduling · free, no key needed

Compute CPM zero-slack critical nodes and tight edges on a DAG, plus one representative critical path.

Use when you need to: schedule critical path · cpm zero-slack critical path · critical nodes edges and representative path.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "nodes": [
    "spec",
    "api",
    "ui",
    "integ",
    "ship"
  ],
  "edges": [
    {
      "from": "spec",
      "to": "api"
    },
    {
      "from": "spec",
      "to": "ui"
    },
    {
      "from": "api",
      "to": "integ"
    },
    {
      "from": "ui",
      "to": "integ"
    },
    {
      "from": "integ",
      "to": "ship"
    }
  ],
  "durations": {
    "spec": "2",
    "api": "5",
    "ui": "3",
    "integ": "4",
    "ship": "1"
  }
}

Response:

{
  "result": {
    "makespan": "12",
    "critical_nodes": [
      "spec",
      "api",
      "integ",
      "ship"
    ],
    "critical_edges": [
      {
        "from": "spec",
        "to": "api"
      },
      {
        "from": "api",
        "to": "integ"
      },
      {
        "from": "integ",
        "to": "ship"
      }
    ],
    "path": [
      "spec",
      "api",
      "integ",
      "ship"
    ]
  }
}

How to call it

MCP

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

{
  "id": "schedule-critical-path",
  "version": "1.0.0",
  "input": {
    "nodes": [
      "spec",
      "api",
      "ui",
      "integ",
      "ship"
    ],
    "edges": [
      {
        "from": "spec",
        "to": "api"
      },
      {
        "from": "spec",
        "to": "ui"
      },
      {
        "from": "api",
        "to": "integ"
      },
      {
        "from": "ui",
        "to": "integ"
      },
      {
        "from": "integ",
        "to": "ship"
      }
    ],
    "durations": {
      "spec": "2",
      "api": "5",
      "ui": "3",
      "integ": "4",
      "ship": "1"
    }
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/schedule-critical-path/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"nodes":["spec","api","ui","integ","ship"],"edges":[{"from":"spec","to":"api"},{"from":"spec","to":"ui"},{"from":"api","to":"integ"},{"from":"ui","to":"integ"},{"from":"integ","to":"ship"}],"durations":{"spec":"2","api":"5","ui":"3","integ":"4","ship":"1"}}'

The machine-readable contract is at /v1/tools/schedule-critical-path/versions/1.0.0.

CLI

node cli.mjs run schedule-critical-path 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.