nbt-patch
Apply ordered RFC 6902 add, remove, replace, and test operations to a typed NBT JSON document, returning a valid patched document and reporting test conflicts.
Instructions
Apply RFC 6902 add, remove, replace and test operations in order to a typed NBT JSON document; returns the new document. value is the JSON put at path: a typed node {type, value} at a node's path. Every operation must leave valid typed NBT; a failed test fails with ERR_JSON_PATCH_CONFLICT. Example: {"typedJson":{...},"patch":[{"op":"replace","path":"/root/value/answer/value","value":7}]}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"typedJson": "<typedJson>",
"patch": "<patch>"
},
"name": "nbt-patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | RFC 6902 operations, applied in order; add, replace and test need value. | |
| typedJson | Yes | Typed NBT document {rootName, root}; every node is {type, value}, as nbt-decode returns. |