Schedule earliest finish

schedule-earliest-finish · version 1.0.0 · Graphs & scheduling · free, no key needed

Compute CPM earliest start and earliest finish times for a DAG with node durations, plus the project makespan.

Use when you need to: schedule earliest finish · cpm earliest start and finish · earliest finish times for dag tasks.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "nodes": [
    "design",
    "code",
    "review",
    "test",
    "ship"
  ],
  "edges": [
    {
      "from": "design",
      "to": "code"
    },
    {
      "from": "design",
      "to": "review"
    },
    {
      "from": "code",
      "to": "test"
    },
    {
      "from": "review",
      "to": "test"
    },
    {
      "from": "test",
      "to": "ship"
    }
  ],
  "durations": {
    "design": "3",
    "code": "5",
    "review": "2",
    "test": "4",
    "ship": "1"
  }
}

Response:

{
  "result": {
    "nodes": [
      {
        "id": "design",
        "earliest_start": "0",
        "earliest_finish": "3"
      },
      {
        "id": "code",
        "earliest_start": "3",
        "earliest_finish": "8"
      },
      {
        "id": "review",
        "earliest_start": "3",
        "earliest_finish": "5"
      },
      {
        "id": "test",
        "earliest_start": "8",
        "earliest_finish": "12"
      },
      {
        "id": "ship",
        "earliest_start": "12",
        "earliest_finish": "13"
      }
    ],
    "makespan": "13"
  }
}

How to call it

MCP

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

{
  "id": "schedule-earliest-finish",
  "version": "1.0.0",
  "input": {
    "nodes": [
      "design",
      "code",
      "review",
      "test",
      "ship"
    ],
    "edges": [
      {
        "from": "design",
        "to": "code"
      },
      {
        "from": "design",
        "to": "review"
      },
      {
        "from": "code",
        "to": "test"
      },
      {
        "from": "review",
        "to": "test"
      },
      {
        "from": "test",
        "to": "ship"
      }
    ],
    "durations": {
      "design": "3",
      "code": "5",
      "review": "2",
      "test": "4",
      "ship": "1"
    }
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/schedule-earliest-finish/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"nodes":["design","code","review","test","ship"],"edges":[{"from":"design","to":"code"},{"from":"design","to":"review"},{"from":"code","to":"test"},{"from":"review","to":"test"},{"from":"test","to":"ship"}],"durations":{"design":"3","code":"5","review":"2","test":"4","ship":"1"}}'

The machine-readable contract is at /v1/tools/schedule-earliest-finish/versions/1.0.0.

CLI

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

Get the client at /clients/cli/.