Local interval compare

local-interval-compare · version 1.0.0 · Dates & times (UTC, ISO 8601) · free, no key needed

Normalize and compare two discrete millisecond intervals with deterministic boundary relations.

Use when you need to: compare normalized intervals · classify two time intervals · detect interval overlap.

Decide before calling

Read the versioned contract and the supported scope below. Reuse local-interval-compare@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use local-interval-compare@1.0.0 for compare normalized intervals. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "left": {
    "start_ms": "0",
    "end_ms": "10",
    "endpoint_convention": "[)"
  },
  "right": {
    "start_ms": "10",
    "end_ms": "20",
    "endpoint_convention": "[)"
  },
  "caller_rule_version": "r1"
}

Response:

{
  "result": {
    "standard_version": "RFC9557/RFC3339/ISO8601-1:2019",
    "data_version": "iana-tzdb-2025b-subset-nyc",
    "caller_rule_version": "r1",
    "relation": "meets",
    "left_normalized": {
      "start_ms": "0",
      "end_ms": "10",
      "endpoint_convention": "[)"
    },
    "right_normalized": {
      "start_ms": "10",
      "end_ms": "20",
      "endpoint_convention": "[)"
    }
  }
}

How to call it

MCP

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

{
  "id": "local-interval-compare",
  "version": "1.0.0",
  "input": {
    "left": {
      "start_ms": "0",
      "end_ms": "10",
      "endpoint_convention": "[)"
    },
    "right": {
      "start_ms": "10",
      "end_ms": "20",
      "endpoint_convention": "[)"
    },
    "caller_rule_version": "r1"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/local-interval-compare/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":{"start_ms":"0","end_ms":"10","endpoint_convention":"[)"},"right":{"start_ms":"10","end_ms":"20","endpoint_convention":"[)"},"caller_rule_version":"r1"}'

The machine-readable contract is at /v1/tools/local-interval-compare/versions/1.0.0.

CLI

node cli.mjs run local-interval-compare 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.