block.replace
Replace a block in an Obsidian note by its ID, preserving the ID marker and using hash verification to prevent conflicts.
Instructions
Replace the structural block referenced by ^id (paragraph/list-item/table-row/etc.) preserving the ^id marker. Requires expected_block_hash from block.find.
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": {
"file": "<file>",
"blockId": "<blockId>",
"content": "<content>",
"expected_block_hash": "<expected_block_hash>"
},
"name": "block.replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| vault | No | ||
| blockId | Yes | ||
| content | Yes | ||
| dry_run | No | ||
| expected_block_hash | Yes |