list_perspectives
Retrieve all perspectives in OmniFocus to organize and manage tasks effectively using MCP OmniFocus automation capabilities.
Instructions
List all perspectives in OmniFocus.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_perspectives"
}
}Input 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)