Skip to main content
Glama
fortin
by fortin

Query tasks

query_tasks
Read-onlyIdempotent

Retrieve tasks from OmniFocus by source—Inbox, Flagged, Forecast, tags, projects, custom perspectives, or ad-hoc filters—with pagination, search, and sorting.

Instructions

Read tasks from Inbox, Flagged, Forecast, tags, projects, custom perspectives, or an ad-hoc filter.

Results are paginated and compact by default. Use count_tasks when you only need totals. Custom perspectives (source=custom) are saved views, not tags.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoForecast horizon in days. Default 7.
limitNoPage size. Default 50.
cursorNonextCursor from a previous page.
outputNocompact omits notes and full tag paths.compact
searchNoCase-insensitive substring in name or note.
sourceNoWhich task view to read. filter/search use the extra filters below.filter
tag_idNoTag id. Use with source=tag or as a filter.
flaggedNoIf set, require or exclude flagged tasks.
overdueNoPast due and incomplete.
sort_byNoSort key. library keeps OmniFocus order.
tag_idsNoMatch tasks that have any of these tag ids.
task_idNoStable task id. Use with source=id.
has_noteNoIf set, require or exclude tasks with notes.
in_inboxNoIf set, require or exclude inbox tasks.
tag_nameNoTag name. This is a tag, not a perspective.
due_afterNoISO date/datetime lower bound for due.
due_todayNoDue today (local).
folder_idNoOnly tasks in projects inside this folder.
tag_namesNoMatch tasks that have any of these tag names.
task_nameNoTask name. Fails if the name is ambiguous.
due_beforeNoISO date/datetime upper bound for due.
project_idNoOnly tasks in this project.
defer_afterNoISO date/datetime lower bound for defer.
exact_matchNoFor source=tag, require an exact tag name.
task_statusNoRestrict to these OmniFocus task statuses.
defer_beforeNoISO date/datetime upper bound for defer.
estimate_maxNoMaximum estimated minutes.
estimate_minNoMinimum estimated minutes.
has_estimateNoIf set, require or exclude estimated tasks.
is_repeatingNoIf set, require or exclude repeating tasks.
project_nameNoOnly tasks in this project name.
due_this_weekNoDue in the next 7 local days.
planned_afterNoISO date/datetime lower bound for planned.
planned_todayNoPlanned date is today. Requires OmniFocus 4.7+.
show_subtasksNoNest matching tasks into a JSON tree.
available_onlyNoOnly Available/Next/DueSoon/Overdue tasks.
due_this_monthNoDue this calendar month.
hide_completedNoHide completed and dropped tasks. Forced off for completed_today.
perspective_idNoCustom perspective identifier.
planned_beforeNoISO date/datetime upper bound for planned.
completed_todayNoCompleted today.
perspective_nameNoCustom or built-in perspective name. Use with source=custom.
max_subtask_depthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds meaningful behavioral context by stating 'Results are paginated and compact by default,' which agents must know to retrieve complete data, and it clarifies custom-perspective semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences carry the core purpose, pagination behavior, the primary alternative, and the main pitfall. Every sentence earns its place, and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 43-parameter read tool, the description cannot enumerate every filter, but the schema descriptions cover the parameters in detail and an output schema exists. The description supplies the high-level invocation behavior, pagination, the recommended alternative, and the key source=custom clarification, making it complete enough for safe use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 98%, so the baseline is 3. The description adds value beyond the schema by explaining that custom perspectives are saved views rather than tags, which is not obvious from the parameter list alone and helps agents choose between source=custom and tag-based filtering.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Read tasks from Inbox, Flagged, Forecast, tags, projects, custom perspectives, or an ad-hoc filter,' naming the verb, the resource, and the supported sources. This goes well beyond the title 'Query tasks' and clearly separates it from sibling tools like count_tasks and query_projects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly directs agents to 'Use count_tasks when you only need totals,' naming the alternative and the condition that selects it. The note that 'Custom perspectives (source=custom) are saved views, not tags' also prevents a likely misuse of the tag parameters.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.