Skip to content

feat: add Google Tasks integration#154

Open
nspady wants to merge 5 commits intomainfrom
explre/google-task-integration
Open

feat: add Google Tasks integration#154
nspady wants to merge 5 commits intomainfrom
explre/google-task-integration

Conversation

@nspady
Copy link
Owner

@nspady nspady commented Jan 8, 2026

Summary

  • Add optional Google Tasks integration with 6 tools: list-task-lists, list-tasks, get-task, create-task, update-task, delete-task
  • Enable with ENABLE_TASKS=true environment variable or --enable-tasks CLI flag
  • Require re-authentication when Tasks scope is missing (validates OAuth scopes on startup)
  • Add comprehensive integration tests for all Task tools

Changes

  • New Tools: Task management tools following existing handler patterns
  • Auth Flow: Validates OAuth scopes and prompts re-auth when Tasks scope is needed
  • Documentation: Added docs/tasks.md with setup guide and troubleshooting
  • Tests: Unit tests for all handlers + integration tests against real API

Test Plan

  • Unit tests pass (npm test)
  • Integration tests pass (ENABLE_TASKS=true npm test -- src/tests/integration/tasks-integration.test.ts)
  • Manual testing of all Task tools via MCP

nspady added 3 commits January 7, 2026 07:52
Add Google Tasks API support as an opt-in feature via ENABLE_TASKS=true
env var or --enable-tasks CLI flag.

- Add dynamic OAuth scope configuration (src/auth/scopes.ts)
- Add scope tracking in tokenManager for re-auth detection
- Create BaseTaskHandler with Tasks API client
- Implement 7 task tools: list-task-lists, list-tasks, get-task,
  create-task, update-task, complete-task, delete-task
- Add conditional tool registration in registry
- Add 44 unit tests for task handlers
- Update documentation (README, CLAUDE.md, CLI help)
- Add comprehensive integration tests for all Task tools
- Remove CompleteTaskHandler in favor of update-task with status
- Update docs to reflect complete-task removal
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

📊 Tool Description Token Analysis

Summary

Metric Baseline PR Diff
Total Tokens 6,110 6,110 — (0.0%)
Duplicate Patterns 12 12
Potential Savings 493 493
Full token breakdown by tool
Tool Desc Props Names Types Enums Overhead Total
create-event 6 980 141 31 131 829 2118
update-event 12 548 88 28 55 544 1275
search-events 10 197 17 9 0 384 617
list-events 16 160 16 8 0 401 601
respond-to-event 22 208 12 8 27 98 375
get-freebusy 28 139 16 7 0 176 366
get-event 9 75 5 4 0 190 283
delete-event 5 41 6 4 8 83 147
get-current-time 29 37 3 2 0 57 128
list-calendars 4 27 1 1 0 89 122
list-colors 10 16 1 1 0 50 78

Analysis generated at 2026-01-08T06:18:12.065Z

claude and others added 2 commits January 9, 2026 15:44
This commit addresses the three limitations identified in issue #147:

1. **Time-specific tasks limitation documented**
   - Added clear documentation that Google Tasks API only supports date-level due dates
   - Updated tool descriptions and schemas to warn users that time component is ignored
   - Explained that this is a fundamental API limitation, not an implementation issue
   - Provided workarounds for users who need time-specific tasks

2. **Recurring task creation now supported**
   - Implemented recurring task creation in create-task tool
   - Supports daily, weekly, monthly, and yearly frequencies
   - Supports custom intervals (e.g., every 2 weeks)
   - Supports count (max 365) and until date options
   - Creates multiple individual tasks with sequential due dates
   - Tasks are numbered (e.g., "Task Title (#1/5)")
   - Added comprehensive unit tests for all recurrence patterns

3. **Task list creation now available**
   - Added new create-task-list tool
   - Allows users to create custom task lists
   - Includes full unit test coverage
   - Supports multi-account management

Changes:
- Added CreateTaskListHandler with full error handling
- Extended CreateTaskHandler to support recurrence parameter
- Updated task-schemas.ts with recurrence validation schema
- Updated task-responses.ts to support both single and multiple tasks
- Added comprehensive documentation in docs/tasks.md
- Added 15 new unit tests for recurring tasks
- Added 7 unit tests for task list creation
- All 763 tests passing

Technical notes:
- Google Tasks API doesn't natively support recurring tasks; we create multiple individual tasks
- Maximum 365 occurrences per recurrence pattern to prevent API abuse
- Each recurring task is independent (completing one doesn't affect others)
- Add getAccountId, jsonResponse, normalizeDueDate helpers to BaseTaskHandler
- Reduce handler code by ~35% using new helpers
- Add integration tests for create-task-list and recurring tasks
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