Skip to main content
Glama

search_query

Search OmniFocus tasks by name or note content. Filter by project, tags, flagged status, or completion, with cursor-based pagination.

Instructions

Full-text search across OmniFocus task names and/or notes. Use for finding tasks by content when you don't know the ID. Supports optional filters (project, tags, flagged, completion status) and cursor pagination. Do NOT use when a known task ID is available (use task_get instead). Returns tasks[] with pagination; safe to call repeatedly; no side effects. Example: search_query({ q: "dentist" }) Example: search_query({ q: "report", projectId: "prj123", completed: "exclude" })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch query. Case-insensitive substring match. Empty string matches all tasks (useful with filters).
limitNoMax results per page (1..500). Default 50.
scopeNo'name' = search task names only; 'note' = search notes only; 'all' = both. Default 'all'.
cursorNoOpaque cursor from a previous search_query response. Must use identical filters — changing filters returns a ValidationError.
fieldsNoRestrict each returned task to this list of top-level fields (id is always returned). Omit for the full task shape. Empty array returns just id. Unknown names are dropped silently and surface in meta.warnings.WARN_UNKNOWN_FIELDS. Allowed: name, note, noteHtml, projectId, parentId, tagIds, deferDate, deferDateFloating, dueDate, dueDateFloating, estimatedMinutes, flagged, completed, completedAt, dropped, droppedAt, available, blocked, sequential, completedByChildren, repetition, notifications, createdAt, modifiedAt, _links.
tagIdsNoRestrict to tasks carrying ALL of these tags. Get IDs from tag_list.
flaggedNotrue = flagged tasks only; false = unflagged only; omit = all.
completedNo'exclude' = active tasks only; 'only' = completed only; 'any' = both. Default 'exclude'.
projectIdNoRestrict to tasks in this project. Get the ID from project_list.
includeLinksNoWhen true, each task carries a `_links` HATEOAS block (self, project, parent, tags). Default false — the block is omitted to save payload size. Use the task's `id`, `projectId`, `parentId`, and `tagIds` fields directly instead.
maxOutputBytesNoCap the serialized byte size of the returned tasks[] array. When the response would exceed this, the server returns as many whole tasks as fit, sets meta.truncatedAtCap=true with meta.bytesReturned and meta.itemsReturned, and returns a pagination cursor that resumes at the first dropped task. Omit for no cap. Values above the server's hard ceiling (~1 MiB) are clamped. A single task larger than the cap is still returned whole so pagination always advances.
Behavior5/5

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

Declares safety: 'safe to call repeatedly; no side effects.' Discloses cursor pagination constraint (must use identical filters). No annotations to contradict, but description adds behavioral context not in schema.

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?

Two main sentences plus two examples. Front-loaded with purpose. Every sentence adds value. No filler.

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?

Explains return type (tasks[] with pagination), safety, and filter capabilities. Could mention meta fields from maxOutputBytes, but schema covers that. Good coverage for 11-parameter tool with no output schema.

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 has 100% coverage, so baseline 3. Description adds value by summarizing filters ('project, tags, flagged, completion status'), explaining pagination cursor constraints, and giving examples. Slight improvement over schema alone.

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?

Clear statement: 'Full-text search across OmniFocus task names and/or notes.' Verb 'search' + resource 'tasks' + scope. Distinguishes from sibling task_get by explicitly advising against use when ID is known.

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?

Explicit when to use ('when you don't know the ID') and when not to ('Do NOT use when a known task ID is available'). Provides alternative (task_get). Examples show typical usage with filters.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/torsday/omnifocus-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server