set_tap_state
Overwrite or reset a tap's incremental-sync state to rewind a cursor and re-fetch a window, or clear state so the next run performs a full first-run fetch.
Instructions
Overwrite or reset a tap's incremental-sync state. Pass state (a JSON object) to set the bookmark the next run receives via DATRIS_TAP_STATE — e.g. rewind a cursor so a window is re-fetched. Pass reset: true to delete the state entirely: the next run sees no DATRIS_TAP_STATE and does a full first-run fetch. The state shape is defined by the tap's own script (read its code via get_tap to see what keys it expects). Only use this on explicit request or to recover a broken cursor — normal runs manage state themselves, committing it only after a successful run. 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>"
},
"name": "set_tap_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the tap | |
| reset | No | If true, delete the stored state entirely (next run = full first-run fetch). Ignores `state`. | |
| state | No | The state object the next run should receive. Must match the keys the tap's script reads from DATRIS_TAP_STATE. | |
| reason | No | Optional one-line reason for this change, recorded in the platform's audit log and shown to anyone asked to approve it. |