Array set intersection

array-set-intersection · version 1.0.0 · Other utilities · free, no key needed

Return unique left-array values also in the right array, in first-seen order.

Use when you need to: ordered array set intersection · values common to two arrays · intersect JSON arrays preserving order.

Decide before calling

Read the versioned contract and the supported scope below. Reuse array-set-intersection@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 array-set-intersection@1.0.0 for ordered array set intersection. 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": [
    1,
    2,
    2,
    3
  ],
  "right": [
    2,
    4
  ]
}

Response:

{
  "result": {
    "standard_version": "RFC8785",
    "values": [
      2
    ]
  }
}

How to call it

MCP

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

{
  "id": "array-set-intersection",
  "version": "1.0.0",
  "input": {
    "left": [
      1,
      2,
      2,
      3
    ],
    "right": [
      2,
      4
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/array-set-intersection/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":[1,2,2,3],"right":[2,4]}'

The machine-readable contract is at /v1/tools/array-set-intersection/versions/1.0.0.

CLI

node cli.mjs run array-set-intersection 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.