Skip to main content
Glama

drop_task

Remove a specific task from OmniFocus by providing its unique task ID. Part of MCP OmniFocus server for streamlined task automation and management.

Instructions

Drop a task in OmniFocus.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe ID of the task to drop

Implementation Reference

  • Core handler function that executes the drop_task logic by generating and evaluating JavaScript to call task.drop(false) on the specified task in OmniFocus and returns the formatted task details.
    def drop_task(task_id: str) -> dict[str, str]: """Complete a task in OmniFocus. Args: task_id: The ID of the task to complete. Returns: A dictionary containing the dropped 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.drop(false); return formatTask(task); })(); """) ) return evaluate_javascript(script.substitute(__common_functions__=__common_functions__, task_id=task_id))
  • MCP tool registration for 'drop_task', including input schema (Annotated task_id) and docstring, which delegates execution to the omnifocus.drop_task function.
    @mcp.tool def drop_task(task_id: Annotated[str, Field(description="The ID of the task to drop")]) -> dict[str, str]: """Drop a task in OmniFocus.""" return omnifocus.drop_task(task_id)

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