task_batch_create
Create multiple OmniFocus tasks in a single atomic batch. Validates all inputs upfront, then executes each task independently with per-index success/failure reporting. Use idempotency keys for retry safety.
Instructions
Create many OmniFocus tasks 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: once the batch reaches OmniFocus, each task succeeds or fails independently, and the response reports per-index outcomes. Prefer this tool over repeated task_create calls whenever you are creating more than one task. Each item accepts the same shape as task_create (name, optional projectId or parentTaskId, note, flagged, dueDate, deferDate, estimatedMinutes, tagIds, sequential, completedByChildren). Pass idempotency_key to coalesce retries — without one, replaying a half-applied batch duplicates the applied subset. Returns { created: [{index, value: { id, name }}], failed: [{index, errorCode, message}] } — value carries the task name (echoed from the input) so the agent can describe each new task without a follow-up read. Side effects: creates tasks in OmniFocus, sets meta.syncPending = true. Call sync_trigger when you need the tasks to appear on other devices. Example: task_batch_create({ items: [{ name: "Buy milk" }, { name: "Call dentist", projectId: "prj123" }] })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Array of task inputs. 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. |