Skip to main content
Glama

complete_task

Mark a task as completed in OmniFocus by specifying its unique task ID, enabling efficient task management and progress tracking within the MCP OmniFocus automation framework.

Instructions

Complete a task in OmniFocus.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe ID of the task to complete

Implementation Reference

  • MCP tool handler for 'complete_task', decorated with @mcp.tool for registration, defines input schema via Annotated, and delegates to omnifocus helper.
    @mcp.tool def complete_task(task_id: Annotated[str, Field(description="The ID of the task to complete")]) -> dict[str, str]: """Complete a task in OmniFocus.""" return omnifocus.complete_task(task_id)
  • Core implementation of complete_task using JavaScript evaluation to call task.markComplete() in OmniFocus.
    def complete_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 completed 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.markComplete(); return formatTask(task); })(); """) ) return evaluate_javascript(script.substitute(__common_functions__=__common_functions__, task_id=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