77trust / 100

Availability Intersect

by Schedule & Timezone Tools in Productivity & SaaS

x402 APIPassing, checked 3 h ago

Meeting availability intersection — find maximal common free time slots across participant calendars within a bounded window.

POST https://schedule-tools.use.x402atlas.com/availability-intersect

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
426 ms typical, 470 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://schedule-tools.use.x402atlas.com/availability-intersect" \
  -H "content-type: application/json" \
  -d '{"minimum_duration_seconds":1800,"participants":[{"id":"engineering","intervals":[{"end":"2024-06-03T12:00:00Z","start":"2024-06-03T09:00:00Z"}],"mode":"available"},{"id":"design","intervals":[{"end":"2024-06-03T11:30:00Z","start":"2024-06-03T10:00:00Z"}],"mode":"available"},{"id":"product","intervals":[{"end":"2024-06-03T12:30:00Z","start":"2024-06-03T10:30:00Z"}],"mode":"available"}],"window_end":"2024-06-03T13:00:00Z","window_start":"2024-06-03T09:00:00Z"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fschedule-tools.use.x402atlas.com%2Favailability-intersect
const res = await pay("https://schedule-tools.use.x402atlas.com/availability-intersect", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"minimum_duration_seconds":1800,"participants":[{"id":"engineering","intervals":[{"end":"2024-06-03T12:00:00Z","start":"2024-06-03T09:00:00Z"}],"mode":"available"},{"id":"design","intervals":[{"end":"2024-06-03T11:30:00Z","start":"2024-06-03T10:00:00Z"}],"mode":"available"},{"id":"product","intervals":[{"end":"2024-06-03T12:30:00Z","start":"2024-06-03T10:30:00Z"}],"mode":"available"}],"window_end":"2024-06-03T13:00:00Z","window_start":"2024-06-03T09:00:00Z"}),
});
console.log(await res.json());

Example input

{
  "minimum_duration_seconds": 1800,
  "participants": [
    {
      "id": "engineering",
      "intervals": [
        {
          "end": "2024-06-03T12:00:00Z",
          "start": "2024-06-03T09:00:00Z"
        }
      ],
      "mode": "available"
    },
    {
      "id": "design",
      "intervals": [
        {
          "end": "2024-06-03T11:30:00Z",
          "start": "2024-06-03T10:00:00Z"
        }
      ],
      "mode": "available"
    },
    {
      "id": "product",
      "intervals": [
        {
          "end": "2024-06-03T12:30:00Z",
          "start": "2024-06-03T10:30:00Z"
        }
      ],
      "mode": "available"
    }
  ],
  "window_end": "2024-06-03T13:00:00Z",
  "window_start": "2024-06-03T09:00:00Z"
}

Example output

{
  "algorithm_version": "schedule-v1",
  "minimum_duration_seconds": 1800,
  "operation": "availability-intersect",
  "participant_count": 3,
  "participant_ids": [
    "engineering",
    "design",
    "product"
  ],
  "slot_count": 1,
  "slots": [
    {
      "end": "2024-06-03T11:30:00Z",
      "start": "2024-06-03T10:30:00Z"
    }
  ],
  "warnings": [],
  "window": {
    "end": "2024-06-03T13:00:00Z",
    "start": "2024-06-03T09:00:00Z"
  }
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402426 ms$0.005
6 h agoPassed402456 ms$0.005
10 h agoPassed402397 ms$0.005
13 h agoPassed402382 ms$0.005
18 h agoPassed402470 ms$0.005
21 h agoPassed402508 ms$0.005
24 h agoPassed402426 ms$0.005
29 h agoPassed402376 ms$0.005