Skip to main content
Glama
someposer
by someposer

activate_task

Reactivate a dropped or completed task in OmniFocus by providing the task ID, enabling users to restore tasks for continued use or management.

Instructions

Activate (un-drop or un-complete) a task in OmniFocus.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe ID of the task to activate

Implementation Reference

  • MCP tool handler for 'activate_task'. Includes input schema via Annotated Field, docstring description, and delegates to omnifocus.activate_task helper. Automatically registered via @mcp.tool decorator.
    @mcp.tool
    def activate_task(task_id: Annotated[str, Field(description="The ID of the task to activate")]) -> dict[str, str]:
        """Activate (un-drop or un-complete) a task in OmniFocus."""
        return omnifocus.activate_task(task_id)
  • Core helper function implementing task activation via JavaScript execution in OmniFocus. Retrieves task by ID, sets task.active = true, formats and returns task details.
    def activate_task(task_id: str) -> dict[str, str]:
        """Activate a task in OmniFocus.
    
        Args:
            task_id: The ID of the task to activate.
    
        Returns:
            A dictionary containing the activated task's details.
        """
        script = Template(
            dedent("""
        ${__common_functions__}
        
        (() => {
            let task = Task.byIdentifier("${task_id}");
            if (!task) {
                throw "Could not find task: " + task_id.toString();
            }
            
            task.active = true;
            return formatTask(task);
        })();
        """)
        )
    
        return evaluate_javascript(script.substitute(__common_functions__=__common_functions__, task_id=task_id))
Install Server

Other Tools

Related 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/someposer/mcp-omnifocus'

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