restore_script_version
Restore an earlier version of a pipeline's AI data-quality rule or AI transformation by writing it back as a new latest version. Use it to roll back a script the pipeline runs.
Instructions
Make an earlier version of a pipeline's AI data-quality rule or AI transformation script the one the pipeline runs. APPEND-ONLY and SIDE-EFFECTING: the restore writes the chosen text back as a NEW latest version (no model call); the pipeline's definition version does not change. If that text is already the live script, nothing is written and the response carries noop: true. Refused when the pipeline's instruction or source schema no longer matches the version (HTTP 422 with the reason; nothing is changed), and refused with HTTP 409 when a repository-backed script file was edited since its recorded commit. Only call this when the operator has explicitly asked to restore this specific script version. Report the new version and stop. If this Datris instance's agent policy requires a person to approve this action, the call does NOT perform it: it returns status pending_approval with an approvalId. Tell the user it is waiting for approval in Datris, then poll get_approval with that id (pause with wait_seconds between polls) — do not re-issue the action.
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": {
"name": "<name>",
"kind": "<kind>",
"version": "<version>"
},
"name": "restore_script_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Which script: the AI data-quality rule or the AI transformation | |
| name | Yes | Name of the pipeline | |
| reason | No | Optional one-line reason for this change, recorded in the platform's audit log and shown to anyone asked to approve it. | |
| version | Yes | Script version to restore (becomes a new latest version) |