Conversation
doistbot
left a comment
There was a problem hiding this comment.
This PR introduces five new MCP tools for managing goals, along with the corresponding schema updates and expanded entity types. Expanding these capabilities is a fantastic addition that will significantly enhance the server's utility. There are a few implementation details to address, specifically completing the tool registration across all required index, script, and test files, updating the schema and runtime logic to use provider-safe sentinel strings instead of null values for clearing fields, and bumping the @doist/todoist-sdk dependency to ensure the new APIs resolve correctly.
scottlovegrove
left a comment
There was a problem hiding this comment.
We're missing an update to
src/tools/find-goals.ts
Outdated
| 'Search for a goal by name (partial and case insensitive match). Supports wildcards (e.g. "ship*"). If omitted, all goals are returned.', | ||
| ), | ||
| ownerType: z | ||
| .enum(['USER', 'WORKSPACE']) |
There was a problem hiding this comment.
We should be able to import this array from the Todoist SDK when it's published, rather than having it as its own thing.
There was a problem hiding this comment.
Agreed — added a TODO for now. We exported GOAL_OWNER_TYPES from the SDK in PR #548, so once that's published we can import it directly instead of the hardcoded array.
@scottlovegrove to... ? 😅 |
I wrote that in the review field to remind myself to mention something, then realised I didn't need and then completely forgot to remove it from the review 🤦🏻♂️ |
|
@gnapse renamed |
gnapse
left a comment
There was a problem hiding this comment.
A couple of improvement suggestions.
|
@scottlovegrove @gnapse any objections before I merge? |
No objections per se, however, the MCP server doesn't have a pre-release track, so if we merge it (and we should be merging to main really), it will be available for everyone. I deliberately didn't include a pre-release track on this repo because when it comes to our remote MCP, we can't have two different tracks. |
Also, you haven't updated to the pre-release version of the SDK. In all, I would say we should wait until we are happy for all users to get this feature before we merge. |
|
makes sense @scottlovegrove. I'll keep this open until we're ready for all users 👍🏽 |
af1c412 to
f09a593
Compare
Add 5 new goal tools: find-goals, add-goals, update-goals, complete-goals, link-goal-items. Also add 'goal' to delete-object and fetch-object entity types, GoalSchema to output-schemas, and goal tool names to tool-names registry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…uctions - Replace .nullable() with "remove"/"unassign" sentinels in update-goals for Gemini compatibility - Add goal tools to the instructions string in mcp-server.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Complete tool registration per AGENTS.md: - src/index.ts: add to tools object and named exports - scripts/run-tool.ts: add to tools record - tool-annotations.test.ts: add annotation expectations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Will replace hardcoded enum once the SDK is published. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- link-goal-items → link-goal-tasks - LINK_GOAL_ITEMS → LINK_GOAL_TASKS - linkGoalItems → linkGoalTasks - itemIds → taskIds - Updated all registration points Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reorganize named exports so goal tools (addGoals, completeGoals, findGoals, linkGoalTasks, updateGoals) are grouped under one comment block instead of scattered alphabetically. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update GoalSchema progress fields to match SDK (totalTaskCount/completedTaskCount), make progress optional, fix linkTaskToGoal/unlinkTaskFromGoal to use TaskLinkingArgs object, and fix formatting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
693a4e3 to
8e2a96e
Compare
Summary
find-goals,add-goals,update-goals,complete-goals,link-goal-tasksGoalSchemato output schemasgoaltodelete-objectandfetch-objectentity typesPart of bringing the
Goalsfeature to the REST API, CLI, and MCP. See spec.Depends on SDK PR (Doist/todoist-sdk-typescript#548). Can be merged in parallel with CLI PR (Doist/todoist-cli#218).
mainmaintd goalmainmainMerge order: 1.1 → 1.2 → 1.3 → 1.4 → 1.5 → 2 → (3 + 4 in parallel)
Test plan
npx tsc --noEmitpasses🤖 Generated with Claude Code