list_perspectives
Retrieve all perspectives in OmniFocus to organize and manage tasks effectively using MCP OmniFocus automation capabilities.
Instructions
List all perspectives in OmniFocus.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_omnifocus/server.py:31-35 (registration)The list_perspectives tool is registered as an MCP tool using the @mcp.tool decorator. This is the entry point handler that delegates to the omnifocus module.@mcp.tool def list_perspectives() -> list[str]: """List all perspectives in OmniFocus.""" return omnifocus.list_perspectives()
- The core handler function that executes the JavaScript script to list all built-in and custom perspectives in OmniFocus via evaluate_javascript.def list_perspectives() -> list[str]: """List all perspectives in OmniFocus. Returns: A list containing the list of perspective names. """ script = dedent(""" (() => { let perspectives = new Array(); perspectives = perspectives.concat(Perspective.BuiltIn.all); perspectives = perspectives.concat(Perspective.Custom.all); return perspectives.map(perspective => perspective.name); })(); """) return evaluate_javascript(script)