IPv4 prefix set intersect

ipv4-prefix-set-intersect · version 1.0.0 · URLs & IP addresses · free, no key needed

Intersect two IPv4 prefix sets into one sorted minimal list of disjoint CIDRs.

Use when you need to: intersection of two ipv4 prefix sets · cidr blocks common to two ipv4 sets · addresses covered by both prefix sets.

Decide before calling

Read the versioned contract and the supported scope below. Reuse ipv4-prefix-set-intersect@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 ipv4-prefix-set-intersect@1.0.0 for intersection of two ipv4 prefix sets. 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": [
    "10.0.0.0/8"
  ],
  "right": [
    "10.2.0.0/16",
    "11.0.0.0/8"
  ]
}

Response:

{
  "result": {
    "prefixes": [
      "10.2.0.0/16"
    ],
    "count": 1
  }
}

How to call it

MCP

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

{
  "id": "ipv4-prefix-set-intersect",
  "version": "1.0.0",
  "input": {
    "left": [
      "10.0.0.0/8"
    ],
    "right": [
      "10.2.0.0/16",
      "11.0.0.0/8"
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/ipv4-prefix-set-intersect/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":["10.0.0.0/8"],"right":["10.2.0.0/16","11.0.0.0/8"]}'

The machine-readable contract is at /v1/tools/ipv4-prefix-set-intersect/versions/1.0.0.

CLI

node cli.mjs run ipv4-prefix-set-intersect 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.