task_defer_smart
Defer a task to a date computed from a high-level intent like 'next work day' or 'in 3 business days', avoiding weekends or off-hours. Supports dry-run and idempotency.
Instructions
Defer a task to a date computed from a high-level intent (e.g. 'next work morning', 'skip weekends', 'in 3 business days'), instead of guessing an ISO date that may land on a weekend or off-hours. Variants: next-work-day, next-weekday, in-business-days, after-event (gated on calendar bridge), next-month-start, explicit-with-skip-weekends. Morning/afternoon defaults are configurable via OMNIFOCUS_MORNING_HOUR / OMNIFOCUS_AFTERNOON_HOUR env (default 09:00 / 14:00). Do NOT use this for unconditional ISO-date defers — prefer task_update with deferDate. Returns { taskId, resolvedDeferDate, reason } so the agent can echo the resolved date verbatim. Side effects: writes the resolved deferDate via task_update; supports dry_run, idempotency_key, and expectedModifiedAt for safety. Triggers a sync. Example: task_defer_smart({ taskId: '...', intent: { kind: 'next-work-day' } })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent | Yes | High-level defer intent. Discriminated union on `kind` — see tool description for variants. | |
| taskId | Yes | ID of the task to defer. | |
| dry_run | No | When true, validates input and resolves the intent but does NOT write to OmniFocus. Returns the resolved date + reason in the response with meta.dryRun = true. | |
| idempotency_key | No | Idempotency key for retry-safe defers. Identical subsequent calls within the TTL window replay the original envelope with meta.idempotentReplay = true instead of re-applying. | |
| expectedModifiedAt | No | Optimistic-concurrency guard: ISO-8601 timestamp from a recent task_get. If the task's current modifiedAt differs, the call fails with OF_CONFLICT and no update is performed. Omit to skip the check. |