JSON patch apply

json-patch-apply · version 1.0.0 · JSON & JSONL · free, no key needed

Apply an RFC 6902 JSON Patch atomically; returns the document or the failing operation index and pointer.

Use when you need to: apply a JSON patch atomically · update a JSON document with patch operations · run RFC 6902 operations.

Decide before calling

Read the versioned contract and the supported scope below. Reuse json-patch-apply@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-patch-apply@1.0.0 for apply a JSON patch atomically. 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:

{
  "document": {
    "a": 1
  },
  "patch": [
    {
      "op": "replace",
      "path": "/a",
      "value": 2
    }
  ]
}

Response:

{
  "result": {
    "standard_version": "RFC 6902 (April 2013); RFC 6901 (April 2013)",
    "applied": true,
    "document": {
      "a": 2
    }
  }
}

How to call it

MCP

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

{
  "id": "json-patch-apply",
  "version": "1.0.0",
  "input": {
    "document": {
      "a": 1
    },
    "patch": [
      {
        "op": "replace",
        "path": "/a",
        "value": 2
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/json-patch-apply/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"document":{"a":1},"patch":[{"op":"replace","path":"/a","value":2}]}'

The machine-readable contract is at /v1/tools/json-patch-apply/versions/1.0.0.

CLI

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

Get the client at /clients/cli/.