pine_save_next
Saves the next cloud version of one Pine script after validating the prior version and source hash, backing up old source, and verifying the new source and version update.
Instructions
Save the next cloud version of exactly one Pine script after matching prior version/full-source hash; back up old source and independently verify the version moved and new source matches, allowing only explicit uniform LF/CRLF conversion.
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": {
"script_id": "<script_id>",
"expected_version": "<expected_version>",
"expected_saved_source_sha256": "<expected_saved_source_sha256>",
"source": "<source>",
"target_id": "<target_id>",
"expected_layout_id": "<expected_layout_id>"
},
"name": "pine_save_next"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| script_id | Yes | ||
| target_id | Yes | Exact Chrome tab target ID from browser_list_tabs. Required for changes. | |
| timeout_ms | No | ||
| expected_version | Yes | ||
| expected_layout_id | Yes | Expected saved-layout ID. A mismatch stops the operation before writing. | |
| expected_saved_source_sha256 | Yes |