Skip to content

perf: server-side assignee scoping in find-tasks and parallel fetching in get-overview#310

Merged
gnapse merged 4 commits intomainfrom
ernesto/cli-perf-audit
Feb 12, 2026
Merged

perf: server-side assignee scoping in find-tasks and parallel fetching in get-overview#310
gnapse merged 4 commits intomainfrom
ernesto/cli-perf-audit

Conversation

@gnapse
Copy link
Collaborator

@gnapse gnapse commented Feb 11, 2026

Pull Request

Closes #311. Inspired by Doist/todoist-cli#59.

Short description

Ports two performance optimizations from the CLI to the MCP server, and fixes a pre-existing bug found during review:

  1. Server-side assignee scoping in find-tasks: The text/labels search path was fetching all matching tasks then filtering by responsibleUid client-side. In large workspaces this meant paginating through many irrelevant team members' tasks. Now uses buildResponsibleUserQueryFilter() to append assignee filters (e.g. !assigned to: others) directly to the API query — matching what find-tasks-by-date already does.

  2. Parallel fetching in get-overview: generateProjectOverview was calling getProject(), getProjectSections(), and getAllTasksForProject() sequentially. These are independent and now run in parallel via Promise.all.

  3. Bug fix: filterTasksByResponsibleUser missing assigned mode (bug: filterTasksByResponsibleUser does not implement 'assigned' mode for container path #311): The assigned filtering mode in the container-based path (projectId/sectionId/parentId) was returning all tasks instead of only tasks assigned to others.

Note: The container-based search path in find-tasks still uses client-side assignee filtering because getTasks doesn't support filter queries.

Manual testing

Verified all three affected tools against the live Todoist API using scripts/run-tool.ts:

  • find-tasks with text search ({"searchText":"meeting","limit":3}) — returns filtered results correctly
  • find-tasks-by-date with today ({"startDate":"today","limit":3}) — confirmed already correct
  • get-overview with project ID — returns full project structure correctly

PR Checklist

  • Added tests for bugs / new features
  • Updated docs (README, etc.)

🤖 Generated with Claude Code

…g in get-overview

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnapse gnapse self-assigned this Feb 11, 2026
@gnapse gnapse added the Show PR is shipped with an async review label Feb 11, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves performance of Todoist MCP server tools by moving assignee scoping into server-side filter queries for find-tasks (text/labels path) and by parallelizing independent API calls in get-overview project view generation.

Changes:

  • Append responsible-user scoping (e.g. !assigned to: others) directly into the find-tasks filter query for text/labels searches.
  • Fetch project, sections, and tasks in parallel in get-overview via Promise.all.
  • Update find-tasks unit tests to assert the updated filter query strings.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/tools/get-overview.ts Parallelizes project/sections/tasks fetching when generating a project overview.
src/tools/find-tasks.ts Adds server-side responsible-user filtering to the text/labels filter-query path and updates result counting accordingly.
src/tools/tests/find-tasks.test.ts Updates expected filter queries to include server-side responsible-user scoping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

gnapse and others added 3 commits February 12, 2026 13:36
…rch path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnapse gnapse merged commit e6db532 into main Feb 12, 2026
4 checks passed
@gnapse gnapse deleted the ernesto/cli-perf-audit branch February 12, 2026 16:50
scottlovegrove pushed a commit that referenced this pull request Feb 14, 2026
🤖 I have created a release *beep* *boop*
---


## [7.9.0](v7.8.1...v7.9.0)
(2026-02-14)


### Features

* add project-management tool for archive/unarchive
([#314](#314))
([29226af](29226af))


### Performance Improvements

* server-side assignee scoping in find-tasks and parallel fetching in
get-overview ([#310](#310))
([e6db532](e6db532))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Show PR is shipped with an async review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: filterTasksByResponsibleUser does not implement 'assigned' mode for container path

3 participants