Skip to content

Fix filter_tasks to include inbox tasks in results#44

Open
sanjeed5 wants to merge 16 commits into
jacepark12:mainfrom
sanjeed5:main
Open

Fix filter_tasks to include inbox tasks in results#44
sanjeed5 wants to merge 16 commits into
jacepark12:mainfrom
sanjeed5:main

Conversation

@sanjeed5

@sanjeed5 sanjeed5 commented Jan 6, 2026

Copy link
Copy Markdown

Summary

  • Fixes issue where filter_tasks did not include inbox tasks when filtering across all projects
  • The inbox has a special ID format (e.g., inbox116792701) and wasn't being returned by get_projects() or handled correctly when iterating through projects

Changes

  • Added logic in _get_project_tasks_by_filter to detect if inbox is already in the projects list
  • If inbox is not found, explicitly adds it so it gets fetched with the special "inbox" ID
  • Fixed filter_tasks to handle project_id="inbox" directly without searching the projects list
  • Uses actual project info from API response for proper formatting
  • Gracefully handles errors when fetching project data

Test plan

  • Verified get_project_tasks("inbox") works (18 tasks found)
  • Verified filter_tasks(date_filter="today") now includes inbox (15 projects = 14 + inbox)
  • Verified filter_tasks(project_id="inbox", date_filter="today") works correctly (4 tasks)

cursoragent and others added 16 commits June 28, 2025 13:52
…ckTick MCP server

Co-authored-by: msanjeed5 <msanjeed5@gmail.com>
…tocol-and-document-1314

Add Codebase-explained.md
…hentication, task and project management endpoints, and usage examples.
- Consolidated 8 filtering tools into 1 flexible filter_tasks tool
- Removed batch_create_tasks (LLM can call create_task multiple times)
- Converted GTD tools to prompts (/engaged, /next_actions)
- Enhanced all tool descriptions with examples and detailed docs
- Fixed critical date parsing bug in filter_tasks and helper functions
  - Added _parse_ticktick_date() to handle TickTick API date format
  - Fixed all date-based filters that were silently failing
- Updated README.md with new structure and examples

Result: 45% reduction in tool count (22 → 12 tools + 2 prompts)
- Add _to_local_date() helper function to convert datetime with timezone to local date
- Update _is_task_due_today() to use local timezone
- Update _is_task_overdue() to use local timezone with proper naive datetime handling
- Update _is_task_due_in_days() to use local timezone
- Update filter_tasks() 'this_week' filter to use local timezone
- All date comparisons now work according to user's local timezone
- Change now_local from naive datetime to timezone-aware datetime
- Use datetime.now(timezone.utc).astimezone() instead of datetime.now()
- Fixes comparison error when comparing timezone-aware task_dt_local with naive now_local
Add .mcp.json for project-scoped MCP server config, enabling
Claude Code CLI to auto-detect the TickTick MCP server.
The inbox has a special ID format (e.g., "inbox116792701") and may not be
returned by get_projects() or handled correctly when iterating through
projects. This fix:

- Adds logic to detect if inbox is in the projects list
- Explicitly adds inbox for fetching if not present when filtering all projects
- Handles the special case when project_id="inbox" is specified
- Uses actual project info from API response instead of synthetic entry
- Gracefully handles errors when fetching project data

Fixes #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants