Sequence index map

sequence-index-map · version 1.0.0 · Sequences & diffs · free, no key needed

Map each left-sequence index to a kept right index, or null if deleted, and list inserted right indices.

Use when you need to: sequence index map · map left indices onto a right sequence · sequence keep index map.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "left": [
    "A",
    "B",
    "C"
  ],
  "right": [
    "A",
    "X",
    "C"
  ]
}

Response:

{
  "result": {
    "map": [
      0,
      null,
      2
    ],
    "inserted": [
      1
    ]
  }
}

How to call it

MCP

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

{
  "id": "sequence-index-map",
  "version": "1.0.0",
  "input": {
    "left": [
      "A",
      "B",
      "C"
    ],
    "right": [
      "A",
      "X",
      "C"
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/sequence-index-map/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":["A","B","C"],"right":["A","X","C"]}'

The machine-readable contract is at /v1/tools/sequence-index-map/versions/1.0.0.

CLI

node cli.mjs run sequence-index-map 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.