Skip to content

Add tool to fetch completed/abandoned tasks #3

@krisrowe

Description

@krisrowe

Summary

Currently list_tasks only returns incomplete tasks (status=0). There's no way to retrieve completed or abandoned tasks.

API Endpoint

The TickTick API has an endpoint for completed tasks:

GET /project/all/completed?from=YYYY-MM-DDTHH:MM:SS&to=YYYY-MM-DDTHH:MM:SS

Parameters:

  • from (required): Start datetime in ISO format
  • to (optional): End datetime in ISO format
  • Returns up to 100 tasks per request

Proposed Tool

@mcp.tool(name="list_completed_tasks")
async def list_completed_tasks(
    start_date: str,  # Required, YYYY-MM-DD format
    end_date: str = None,  # Optional
) -> dict[str, Any]:

This would return tasks completed within the date range, including both "Completed" (status=2) and "Won't Do" (status=-1) tasks.

Use Cases

  1. Review what was accomplished in a time period
  2. Find tasks marked "Won't Do" for potential re-evaluation
  3. Search completed tasks for reference information in their notes

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions