bulk_apply
Apply up to 500 add-tag, remove-tag, or move operations on DEVONthink records in a single batch call. Preview with dry-run, then confirm to commit; halts on first error for partial undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Apply many small ops in one call. Dry-run by default. Same preview-then-apply contract as `file_document`: call once with `dry_run=true` to inspect the planned operations and receive a `preview_token` (audit_id), then call again with `dry_run=false` + `confirm_token=<previous preview_token>` to commit. Failure semantics: DEVONthink has no transactions, so we cannot automatically roll back already-applied ops. Default is `stop_on_first_error=true` — the batch halts at the first failure and `failed_index` reports the offending op. The audit log records the partial state; the user can selectively undo applied ops by audit_id. Limits: max 500 ops per call. When to use: - Tag many records with the same tag. - Move a curated set of records to a single destination group. - Combine a few tag/move ops on the same set of records. Don't use for: - Single-record tagging/move — use `apply_tag`/`move_record` flows via `file_document` for richer audit (before_state). - Auto-classification — use `file_document` (calls DT classifier). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| success | Yes | ||
| audit_id | No | ||
| warnings | No | ||
| error_code | No | ||
| error_message | No | ||
| recovery_hint | No |