task_reclassify
Reclassify multiple tasks at once by predicate matching, with a safe two-phase dry-run then apply process. Supports adding or removing tags, setting project, or flagging tasks uniformly.
Instructions
Predicate-driven bulk task reclassification with a mandatory two-phase contract. Phase 1 (dryRun: true): match tasks by predicate, return { matched, proposed: [{taskId, before, after}] } with no mutations. Phase 2 (dryRun: false): require confirmation echoing the matched count from the prior dry-run; mismatch fails fast. Caps at 200 matches per apply; use task_batch_update with explicit IDs for larger sets. Predicate AST: title-contains / tag / project leaves and and / or / not combinators (full shape in JSONSchema). Changes apply uniformly: addTags, removeTags, setProject, setFlagged. Do NOT use this tool when you have explicit task IDs — call task_batch_update directly. Side effects (apply phase only): writes to OmniFocus, sets meta.syncPending = true. Call sync_trigger when you need changes to appear on other devices. Example: task_reclassify({ predicate: { kind: "tag", tagId: "tag123" }, changes: { setFlagged: true }, dryRun: false, confirmation: "3" })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Default true — return the diff without mutating. false requires `confirmation` echoing the matched count from a prior dry-run. | |
| changes | Yes | Changes applied uniformly to every matched task. | |
| predicate | Yes | AST for selecting tasks. Composable via and/or/not. Always evaluated against open (non-completed, non-dropped) tasks. | |
| confirmation | No | When dryRun is false, the matched count from the most recent dry-run, as a string (e.g. "42"). Mismatch with the actual current match count fails the call fast. |