query_omnifocus
Retrieve specific tasks, projects, or folders from OmniFocus using flexible filters, field selections, sorting, and limits. Get targeted results without full database dumps.
Instructions
Efficiently query OmniFocus database with filters, fields, sorting, limits, and summaries. Prefer this over dump_database for targeted lookups.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | Yes | Type of entity to query. Choose 'tasks' for individual tasks, 'projects' for projects, or 'folders' for folder organization | |
| filters | No | Optional filters to narrow results. ALL filters combine with AND logic (must match all). Within array filters (tags, status) OR logic applies | |
| fields | No | Specific fields to return (reduces response size). TASK FIELDS: id, name, note, flagged, taskStatus, dueDate, deferDate, plannedDate, effectiveDueDate, effectiveDeferDate, effectivePlannedDate, completionDate, dropDate, effectiveDropDate, estimatedMinutes, tagNames, tags, projectName, projectId, parentId, childIds, hasChildren, sequential, completedByChildren, inInbox, isRepeating, repetitionRule, modificationDate (or modified), creationDate (or added). PROJECT FIELDS: id, name, status, note, folderName, folderID, sequential, dueDate, deferDate, effectiveDueDate, effectiveDeferDate, completionDate, dropDate, effectiveDropDate, completedByChildren, containsSingletonActions, taskCount, tasks, nextReviewDate, reviewInterval, modificationDate, creationDate. FOLDER FIELDS: id, name, path, parentFolderID, status, projectCount, projects, subfolders. NOTE: Date fields use 'added' and 'modified' in OmniFocus API | |
| limit | No | Maximum number of items to return. Useful for large result sets. Default: no limit | |
| sortBy | No | Field to sort by. OPTIONS: name (alphabetical), dueDate (earliest first, null last), deferDate (earliest first, null last), modificationDate (most recent first), creationDate (oldest first), estimatedMinutes (shortest first), taskStatus (groups by status) | |
| sortOrder | No | Sort order. 'asc' = ascending (A-Z, old-new, small-large), 'desc' = descending (Z-A, new-old, large-small). Default: 'asc' | |
| includeCompleted | No | Include completed and dropped items. Default: false (active items only) | |
| summary | No | Return only count of matches, not full details. Efficient for statistics. Default: false |