Duration add

duration-add · version 1.0.0 · Dates & times (UTC, ISO 8601) · free, no key needed

Sum mixed SI duration terms in nanoseconds and return the exact rational in a target unit.

Use when you need to: duration add · add duration terms · sum mixed duration units.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "terms": [
    {
      "value": "1",
      "unit": "min"
    },
    {
      "value": "30",
      "unit": "s"
    }
  ],
  "to": "s"
}

Response:

{
  "result": {
    "numerator": "90",
    "denominator": "1"
  }
}

How to call it

MCP

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

{
  "id": "duration-add",
  "version": "1.0.0",
  "input": {
    "terms": [
      {
        "value": "1",
        "unit": "min"
      },
      {
        "value": "30",
        "unit": "s"
      }
    ],
    "to": "s"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/duration-add/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"terms":[{"value":"1","unit":"min"},{"value":"30","unit":"s"}],"to":"s"}'

The machine-readable contract is at /v1/tools/duration-add/versions/1.0.0.

CLI

node cli.mjs run duration-add 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.