task_batch_complete
Complete multiple OmniFocus tasks in a single batch with atomic validation and per-item success reporting, reducing round trips.
Instructions
Mark many OmniFocus tasks complete in a single JXA round trip. Validation is atomic: if any input fails schema, the whole batch is rejected before any mutation. Execution is best-effort: each completion succeeds or fails independently, and the response reports per-index outcomes. Prefer this tool over repeated task_complete calls whenever you are completing more than one task. Each item is { id, at? } where at is an optional ISO-8601 completion timestamp (defaults to now). Already-completed tasks are not treated specially here — use task_complete's idempotent noChange path if you need that per-item semantics. Returns { completed: [{index, value: { id, name }}], failed: [{index, errorCode, message}] } — value carries the task name so the agent can describe each completion without a follow-up read. Side effects: writes to OmniFocus, sets meta.syncPending = true. Call sync_trigger when you need changes to appear on other devices. Example: task_batch_complete({ items: [{ id: "abc123" }, { id: "abc456" }] })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Array of { id, at? } items. Must contain at least one item. | |
| idempotency_key | No | Idempotency key for retry-safe batches. Replays within the TTL window return the cached envelope with meta.idempotentReplay = true. See docs/idempotency.md. |