Replace an item's data
replace_item_dataReplace an item's whole data, or the value at pointer. On a list with guard indexes, a replace that covers a guarded value would delete it (this token can't see it), so it's refused unless overwriteGuarded is set: use merge_item_data, patch_item_data or a narrower pointer instead. Pass the etag you read as ifMatch. 1 request (plus 1 to find the list's guard indexes, the first time).
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": {
"list": "<list>",
"item": "<item>"
},
"name": "replace_item_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | The new value | |
| item | Yes | The item: its id or alias value (a deleted item only by id) | |
| list | Yes | The list: its id or pathName | |
| ifMatch | No | The etag you read the item with. The write only happens if nobody has changed the item since; otherwise it fails with ITEM_PRECONDITION_FAILED and nothing is written. Pass it whenever the write is based on something you read | |
| pointer | No | A JSON pointer (RFC 6901) into the item's data, e.g. /address/city or /scores/0. Leave out for the whole data | |
| returnData | No | Return the item's data after the write (default: metadata only) | |
| overwriteGuarded | No | Write even though it replaces values hidden by guard indexes, deleting them. Only if the user means to |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| etag | Yes | ||
| item | Yes |