JSON array align

json-array-align · version 1.0.0 · JSON & JSONL · free, no key needed

Align two JSON arrays with duplicate-safe occurrence pairs and deterministic LCS tie-breaking.

Use when you need to: align two JSON arrays · find common JSON array sequence · match duplicate array occurrences.

Decide before calling

Read the versioned contract and the supported scope below. Reuse json-array-align@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 json-array-align@1.0.0 for align two JSON arrays. 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": [
    "a",
    "b"
  ],
  "right": [
    "a",
    "c",
    "b"
  ]
}

Response:

{
  "result": {
    "reference": "RFC 8259 + Myers 1986",
    "version": "1.0.0",
    "pairs": [
      {
        "left_index": 0,
        "right_index": 0,
        "occurrence": 1
      },
      {
        "left_index": 1,
        "right_index": 2,
        "occurrence": 1
      }
    ],
    "left_only": [],
    "right_only": [
      1
    ]
  }
}

How to call it

MCP

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

{
  "id": "json-array-align",
  "version": "1.0.0",
  "input": {
    "left": [
      "a",
      "b"
    ],
    "right": [
      "a",
      "c",
      "b"
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/json-array-align/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":["a","b"],"right":["a","c","b"]}'

The machine-readable contract is at /v1/tools/json-array-align/versions/1.0.0.

CLI

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

Get the client at /clients/cli/.