Update perspective rules
update_perspective_rulesReplace a custom perspective's filter rules and optional aggregation in OmniFocus. Validates criteria before writing, verifies the change with rollback, and returns previous rules for easy undo.
Instructions
Replace a custom perspective's filter rules (and optionally its aggregation). Overwrites — read current rules first via list_custom_perspectives includeRules. Keys are validated before writing (OmniFocus silently accepts invalid rules), the write is read-back verified with rollback, and the previous rules are returned for undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | The COMPLETE replacement rule array — this overwrites the perspective's rules, it does not merge. Read the current value with list_custom_perspectives({includeRules: true}) first. Leaf rules use keys such as: actionAvailability, actionStatus, actionHasDuration, actionWithinDuration, actionIsUntagged, actionHasTagWithStatus, actionHasAnyOfTags, actionHasAllOfTags, actionHasNoProject, actionHasProjectWithStatus, actionIsInSingleActionsList, actionWithinFocus, … Nest with { aggregateRules: [...], aggregateType: 'all' | 'any' | 'none' } and disable a clause with { disabledRule: {...} }. Example: [{ actionAvailability: 'remaining' }, { aggregateRules: [{ actionStatus: 'flagged' }, { actionStatus: 'due' }], aggregateType: 'any' }] | |
| aggregation | No | Top-level filter aggregation: 'all' = every rule must match, 'any' = at least one. Pass null to clear it. Omit to leave the perspective's current aggregation untouched. | |
| perspectiveId | No | Identifier of the custom perspective (from list_custom_perspectives). Takes precedence over perspectiveName. | |
| perspectiveName | No | Name of the custom perspective to rewrite. Ambiguous names are rejected with the matching identifiers — use perspectiveId then. | |
| allowUnknownKeys | No | Write rule keys this tool does not recognize. Default false. OmniFocus silently ignores unknown keys, which can turn a narrow perspective into one that matches everything — only set this if you are certain the key is valid for your OmniFocus version. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | No | ||
| tool | Yes | ||
| success | Yes |