Skip to content

feat: Add tool annotations for improved LLM tool understanding#1543

Merged
Crunchyman-ralph merged 4 commits into
eyaltoledano:nextfrom
bryankthompson:feat/add-tool-annotations
Jan 2, 2026
Merged

feat: Add tool annotations for improved LLM tool understanding#1543
Crunchyman-ralph merged 4 commits into
eyaltoledano:nextfrom
bryankthompson:feat/add-tool-annotations

Conversation

@bryankthompson

@bryankthompson bryankthompson commented Dec 21, 2025

Copy link
Copy Markdown
Contributor

Summary

Adds MCP tool annotations (readOnlyHint, destructiveHint, title) to all 12 tools to help LLMs better understand tool behavior and make safer decisions about tool execution.

Changes

Read-Only Tools (readOnlyHint: true):

  • get_tasks - Query tasks with optional filtering
  • get_task - Get detailed task information
  • autopilot_status - Get workflow status
  • autopilot_next - Get next action guidance
  • autopilot_resume - Resume workflow from saved state

Destructive Tools (destructiveHint: true):

  • set_task_status - Modify task status
  • generate - Create task files
  • autopilot_start - Initialize workflow, create git branch
  • autopilot_commit - Create git commits
  • autopilot_complete_phase - Update workflow state
  • autopilot_abort - Delete workflow state
  • autopilot_finalize - Complete workflow

Why This Matters

Tool annotations provide semantic metadata that helps LLMs:

  • Understand whether a tool is safe to call without side effects
  • Make better decisions about tool execution order
  • Distinguish between read-only queries and state-changing operations
  • Display human-readable tool titles in UI contexts

Testing

  • TypeScript type check passes (tsc --noEmit)
  • All 12 tool files updated with annotations
  • Annotations use FastMCP's supported ToolAnnotations type

Before/After

Before:

server.addTool({
  name: 'get_tasks',
  description: 'Get all tasks...',
  parameters: GetTasksSchema,
  execute: ...
});

After:

server.addTool({
  name: 'get_tasks',
  description: 'Get all tasks...',
  parameters: GetTasksSchema,
  annotations: {
    title: 'Get Tasks',
    readOnlyHint: true
  },
  execute: ...
});

🤖 Generated with Claude Code


Note

Adds MCP annotations to tools to surface human-readable titles and safety hints.

  • Annotates autopilot tools (start, commit, complete_phase, abort, finalize, status, next, resume) with appropriate destructiveHint or readOnlyHint
  • Annotates task operations (get_tasks, get_task, set_task_status, generate, update, update_task, update_subtask) and dependency utilities (validate_dependencies, fix_dependencies) accordingly
  • Annotates tag/project management tools (add_tag, copy_tag, rename_tag, delete_tag, use_tag, list_tags, move_task, expand_task, expand_all, clear_subtasks, add_subtask, remove_subtask, remove_task, add_dependency, remove_dependency, initialize_project, rules, models, parse_prd, scope_up_task, scope_down_task, next_task, complexity_report, get_operation_status) with title and hints; research also includes openWorldHint
  • Adds changeset documenting the annotation update

Written by Cursor Bugbot for commit 812a447. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Chores
    • Added descriptive UI metadata (titles and destructive/read-only hints) across many Autopilot, Task, and server tools to surface clearer in-app guidance.
  • Documentation
    • Added release notes and a changeset describing the new tool annotations to improve tooling clarity and safer interactions.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot

changeset-bot Bot commented Dec 21, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 812a447

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds UI annotation metadata (annotations: title and hint flags like destructiveHint/readOnlyHint/openWorldHint) to many tool registration objects across apps/mcp and mcp-server and a changeset entry; no runtime logic, control flow, or function signatures were changed.

Changes

Cohort / File(s) Change Summary
Autopilot tools (apps/mcp)
apps/mcp/src/tools/autopilot/abort.tool.ts, apps/mcp/src/tools/autopilot/commit.tool.ts, apps/mcp/src/tools/autopilot/complete.tool.ts, apps/mcp/src/tools/autopilot/finalize.tool.ts, apps/mcp/src/tools/autopilot/start.tool.ts, apps/mcp/src/tools/autopilot/next.tool.ts, apps/mcp/src/tools/autopilot/resume.tool.ts, apps/mcp/src/tools/autopilot/status.tool.ts
Added annotations objects (titles and hint flags: destructiveHint or readOnlyHint) to each tool registration; no logic changes.
MCP app task tools (apps/mcp)
apps/mcp/src/tools/tasks/generate.tool.ts, apps/mcp/src/tools/tasks/get-task.tool.ts, apps/mcp/src/tools/tasks/get-tasks.tool.ts, apps/mcp/src/tools/tasks/set-task-status.tool.ts
Added annotations objects (titles and appropriate hint flags) to tool registrations; metadata-only change.
Server tools (mcp-server)
mcp-server/src/tools/* (e.g. add-dependency.js, add-subtask.js, add-tag.js, add-task.js, analyze.js, clear-subtasks.js, complexity-report.js, copy-tag.js, delete-tag.js, expand-all.js, expand-task.js, fix-dependencies.js, get-operation-status.js, initialize-project.js, list-tags.js, models.js, move-task.js, next-task.js, parse-prd.js, remove-dependency.js, remove-subtask.js, remove-task.js, rename-tag.js, research.js, response-language.js, rules.js, scope-down.js, scope-up.js, set-task-status.js, update-subtask.js, update-task.js, update.js, use-tag.js, validate-dependencies.js)
Added annotations metadata (titles and hint flags such as destructiveHint, readOnlyHint, openWorldHint) to many server-side tool registrations; no functional changes.
Changelog / changeset
.changeset/tool-annotations.md
Added a changeset documenting the new tool annotations (readOnlyHint, destructiveHint, title).
Manifest
package.json
Referenced in summaries; no functional changes indicated in this diff.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Crunchyman-ralph
  • eyaltoledano

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and specifically describes the main change: adding tool annotations to improve LLM understanding of tool behavior and semantics.
Docstring Coverage ✅ Passed Docstring coverage is 95.65% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Crunchyman-ralph

Copy link
Copy Markdown
Collaborator

@triepod-ai nice !

reviewing soon, is this compatible with fastmcp ?

@bryankthompson

Copy link
Copy Markdown
Contributor Author

@Crunchyman-ralph Thanks! Yes, fully compatible with FastMCP.

The project already uses fastmcp: ^3.23.0 in apps/mcp/package.json, and FastMCP has built-in support for tool annotations via the ToolAnnotations type:

type ToolAnnotations = {
  destructiveHint?: boolean;
  idempotentHint?: boolean;
  openWorldHint?: boolean;
  readOnlyHint?: boolean;
  title?: string;
};

I verified this by:

  1. Running npm install to get the dependencies
  2. Checking node_modules/fastmcp/dist/*.d.ts for the type definitions
  3. Running tsc --noEmit in apps/mcp/ - passes with no errors

The annotations are passed directly in the server.addTool() call, which FastMCP handles natively.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.changeset/tool-annotations.md (1)

5-7: Consider enriching the changeset with additional context.

The changeset is correctly formatted and accurately describes the change. However, based on your preference for detailed changesets with comprehensive descriptions (noted in prior feedback), consider expanding the description to include:

  • Example annotations added (e.g., readOnlyHint: true for get_tasks)
  • The intended impact on LLM behavior (safer execution decisions, execution ordering)
  • A brief note on affected tool categories (autopilot and task tools)

This would help users better understand the motivation and scope of the change.

🔎 Example of an enriched changeset description
---
"task-master-ai": patch
---

feat: Add tool annotations for improved LLM tool understanding

Added MCP tool annotations (readOnlyHint, destructiveHint, title) to all 12 tools to help LLMs better understand tool behavior and make safer decisions about tool execution. Read-only tools (get_tasks, get_task, autopilot_status, autopilot_next, autopilot_resume) are now marked with readOnlyHint: true, while state-changing tools (set_task_status, generate, autopilot_start, autopilot_commit, autopilot_complete_phase, autopilot_abort, autopilot_finalize) are marked with destructiveHint: true. This enables safer tool selection, improved execution ordering, and better UI representation of tool capabilities.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f26449 and 0311592.

📒 Files selected for processing (1)
  • .changeset/tool-annotations.md (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Applies to assets/.claude/settings.json : Add Claude Code tool allowlist configuration in `.claude/settings.json` to include 'Edit', 'Bash(task-master *)', 'Bash(git commit:*)', 'Bash(git add:*)', 'Bash(npm run *)', and 'mcp__task_master_ai__*'
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1444
File: apps/cli/src/utils/auto-update/changelog.ts:103-111
Timestamp: 2025-11-25T18:32:29.828Z
Learning: The claude-task-master project uses a custom changelog format with PR numbers and author acknowledgements in the pattern `- [#PR](...) Thanks [author]! - Description`, which is parsed by the regex in apps/cli/src/utils/auto-update/changelog.ts.
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations

Applied to files:

  • .changeset/tool-annotations.md
📚 Learning: 2025-12-11T14:45:14.973Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Applies to assets/.claude/settings.json : Add Claude Code tool allowlist configuration in `.claude/settings.json` to include 'Edit', 'Bash(task-master *)', 'Bash(git commit:*)', 'Bash(git add:*)', 'Bash(npm run *)', and 'mcp__task_master_ai__*'

Applied to files:

  • .changeset/tool-annotations.md
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to .cursor/mcp.json : Add new tool definitions to the tools array in `.cursor/mcp.json`

Applied to files:

  • .changeset/tool-annotations.md
📚 Learning: 2025-12-11T14:45:14.973Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Reference completed Task Master tasks in git commits using format 'git commit -m "feat: <description> (task <id>)"'

Applied to files:

  • .changeset/tool-annotations.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot

@eyaltoledano

Copy link
Copy Markdown
Owner

Nice one. :)

@Crunchyman-ralph Crunchyman-ralph changed the base branch from main to next December 29, 2025 16:18
web-flow and others added 2 commits December 30, 2025 12:12
Add readOnlyHint and destructiveHint annotations to all MCP tools
to help LLMs better understand tool behavior and make safer decisions.

Changes:
- Added readOnlyHint: true to read-only tools (get_tasks, get_task,
  autopilot_status, autopilot_next, autopilot_resume)
- Added destructiveHint: true to tools that modify data (set_task_status,
  generate, autopilot_start, autopilot_commit, autopilot_complete_phase,
  autopilot_abort, autopilot_finalize)
- Added title annotations for human-readable display

This improves tool safety metadata for MCP clients.

Co-Authored-By: Claude <noreply@anthropic.com>
@Crunchyman-ralph Crunchyman-ralph force-pushed the feat/add-tool-annotations branch from 0311592 to 17d73a1 Compare December 30, 2025 11:13
@Crunchyman-ralph

Copy link
Copy Markdown
Collaborator

@triepod-ai added other annotations for all our other mcp tools :D

Extend tool annotations to all 34 MCP tools in mcp-server/src/tools/ to match the TypeScript tools in apps/mcp/.

Annotations added:
   - readOnlyHint: true for query tools (next-task, complexity-report,
     list-tags, validate-dependencies, get-operation-status)
   - destructiveHint: true for deletion tools (remove-task, remove-subtask,
     remove-dependency, delete-tag, clear-subtasks, fix-dependencies,
     set-task-status)
   - openWorldHint: true for external API tools (research)
   - title annotations for all tools

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🧹 Nitpick comments (10)
mcp-server/src/tools/models.js (1)

82-84: Title annotation added successfully.

The title metadata is appropriate. Note that this tool can modify state via setMain, setResearch, and setFallback parameters. Consider adding destructiveHint: true for consistency with other state-changing tools mentioned in the PR objectives, though the tool's dual read/write nature may justify the current annotation.

mcp-server/src/tools/copy-tag.js (1)

39-41: Title annotation added successfully.

The annotation is correctly formatted. Since this tool creates new tags with copied tasks (state-changing operation), consider adding destructiveHint: true to help LLMs distinguish it from read-only operations, consistent with the PR's goal of marking state-changing tools.

mcp-server/src/tools/move-task.js (1)

57-59: Title annotation added successfully.

The annotation is well-formed. Since this tool modifies task positions and structure (state-changing operation), consider adding destructiveHint: true to align with the PR's pattern of marking operations that alter state, helping LLMs make better execution decisions.

mcp-server/src/tools/update-task.js (1)

50-52: Consider adding destructiveHint: true to align with PR objectives.

The update_task tool modifies task state by updating task information. According to the PR objectives, "Destructive/state-changing tools" should be marked with destructiveHint: true to help LLMs distinguish read-only queries from state-changing operations. Adding this hint would make the annotation consistent with similar state-changing tools like set_task_status and improve LLM decision-making.

🔎 Proposed enhancement
 		annotations: {
-			title: 'Update Task'
+			title: 'Update Task',
+			destructiveHint: true
 		},
mcp-server/src/tools/expand-all.js (1)

67-69: Consider adding destructiveHint: true for consistency.

The expand_all tool modifies task state by generating and adding subtasks to pending tasks. According to the PR objectives, state-changing tools should be marked with destructiveHint: true. This would help LLMs recognize this as an operation that modifies task data and make more informed decisions about when to invoke it.

🔎 Proposed enhancement
 		annotations: {
-			title: 'Expand All Tasks'
+			title: 'Expand All Tasks',
+			destructiveHint: true
 		},
mcp-server/src/tools/expand-task.js (1)

55-57: Consider adding destructiveHint: true to match PR objectives.

The expand_task tool modifies task state by generating and adding subtasks. Since the PR aims to mark "Destructive/state-changing tools" with destructiveHint: true, adding this hint would improve consistency and help LLMs correctly identify this as a state-modifying operation.

🔎 Proposed enhancement
 		annotations: {
-			title: 'Expand Task'
+			title: 'Expand Task',
+			destructiveHint: true
 		},
mcp-server/src/tools/use-tag.js (1)

33-35: Consider adding destructiveHint: true to align with PR objectives.

The use_tag tool changes the current tag context, which is a state-changing operation. Per the PR objectives, state-changing tools should include destructiveHint: true to help LLMs distinguish them from read-only queries.

🔎 Proposed enhancement
 		annotations: {
-			title: 'Use Tag'
+			title: 'Use Tag',
+			destructiveHint: true
 		},
mcp-server/src/tools/add-task.js (1)

68-70: Consider adding destructiveHint: true to align with PR objectives.

The add_task tool creates new tasks, which is a state-changing operation. Per the PR objectives, destructive/state-changing tools should include destructiveHint: true to help LLMs make better execution decisions.

🔎 Proposed enhancement
 		annotations: {
-			title: 'Add Task'
+			title: 'Add Task',
+			destructiveHint: true
 		},
mcp-server/src/tools/parse-prd.js (1)

68-70: Consider adding destructiveHint: true to align with PR objectives.

The parse_prd tool generates and writes tasks to the tasks file, which is a state-changing operation. Per the PR objectives, destructive/state-changing tools should include destructiveHint: true to help LLMs distinguish them from read-only queries.

🔎 Proposed enhancement
 		annotations: {
-			title: 'Parse PRD'
+			title: 'Parse PRD',
+			destructiveHint: true
 		},
mcp-server/src/tools/update.js (1)

50-52: Consider adding destructiveHint: true to align with PR objectives.

The update tool modifies multiple tasks based on new context, which is a state-changing operation. Per the PR objectives, destructive/state-changing tools should include destructiveHint: true to help LLMs make better execution decisions.

🔎 Proposed enhancement
 		annotations: {
-			title: 'Update Tasks'
+			title: 'Update Tasks',
+			destructiveHint: true
 		},

Comment thread mcp-server/src/tools/add-dependency.js
Comment thread mcp-server/src/tools/initialize-project.js
Comment thread mcp-server/src/tools/rename-tag.js
Comment thread mcp-server/src/tools/response-language.js
Comment thread mcp-server/src/tools/rules.js
Comment thread mcp-server/src/tools/scope-down.js
Comment thread mcp-server/src/tools/scope-up.js
Comment thread mcp-server/src/tools/update-subtask.js
Extend annotation coverage to include readOnlyHint/destructiveHint
on all JavaScript MCP tools, consistent with Crunchyman-ralph's work
on the TypeScript tools.

Changes per MCP spec decision tree:
- destructiveHint: false → 3 purely additive tools (add-task, add-tag, copy-tag)
- destructiveHint: true → 19 tools that modify existing data or may overwrite

This completes the behavioral hint coverage across both codebases,
enabling MCP clients to properly categorize tool operations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@bryankthompson

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review @coderabbitai!

Following @Crunchyman-ralph's work extending annotations to the TypeScript tools, I've now completed the behavioral hint coverage for the JavaScript tools as well.

All 22 JavaScript tools now have appropriate annotations per the MCP spec:

  • destructiveHint: false for 3 purely additive tools (create new data only)
  • destructiveHint: true for 19 tools that modify existing data or may overwrite files

Key distinction per MCP spec:

  • destructiveHint: false means "performs only additive updates" (pure creation)
  • destructiveHint: true means the tool "may perform destructive updates" (modify/delete existing data)

So add_task creates NEW tasks (additive → false), but add_dependency modifies EXISTING tasks' dependency graphs (destructive → true).

This ensures consistent annotation semantics across both the mcp-server/ and apps/mcp/ codebases. 🎯

@coderabbitai

coderabbitai Bot commented Jan 1, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@triepod-ai You're very welcome!

Your understanding of the MCP spec annotations is spot-on. The destructiveHint is indeed meant to indicate when a tool "may perform destructive updates," and your distinction between purely additive operations (creating new data) versus modifications to existing state is exactly right.

The add_task vs add_dependency example perfectly illustrates this: one creates entirely new task entities, while the other mutates the dependency graph of existing tasks—a critical distinction for LLMs making safe execution decisions.

Excellent work completing the annotation coverage across both TypeScript and JavaScript tool sets! Having consistent semantic metadata across all 46+ tools (12 in apps/mcp/ + 34 in mcp-server/) will significantly improve how LLMs reason about tool safety and behavior. 🎯


🐰✨


🧠 Learnings used
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:28:42.612Z
Learning: Successfully implemented dependency safety system for Crunchyman-ralph using Python-based validation that integrates with their build process. The system prevents production failures by catching missing external dependencies during build time and provides clear error messages directing developers to add missing dependencies to root package.json. Peer dependencies were removed from internal packages as they're unnecessary with their tsdown bundling setup.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:28:42.612Z
Learning: Crunchyman-ralph is concerned about preventing production failures when developers add external dependencies to internal packages but forget to add them to the root package.json in their tsdown bundling setup. He wants automated safety mechanisms to catch this during development or CI rather than discovering it in production.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:28:42.612Z
Learning: Crunchyman-ralph's dependency safety system is now implemented using a Python-based validator that checks external dependencies in internal packages are available in root package.json. The system includes prebuild hooks, clear error messages, and automatic validation during the build process to prevent production failures from missing dependencies in their tsdown bundling setup.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/mcp/src/**/*.{ts,tsx} : MCP (tm/mcp) should be a thin presentation layer that calls tm-core methods and returns MCP-formatted responses; handle only MCP-specific concerns like tool schemas, parameter validation, and response formatting

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/tools/*.js : Use snake_case for MCP tool names exposed to clients (e.g., list_tasks, set_task_status)

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to mcp-server/src/tools/**/*.{js,ts} : Use processMCPResponseData(taskOrData, fieldsToRemove) utility to filter potentially sensitive or large fields (like details, testStrategy) from task objects before sending responses

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/tools/*.js : Use camelCase with Tool suffix for tool registration functions (e.g., registerListTasksTool)

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/tools/*.js : Create MCP tool definitions in `mcp-server/src/tools/` using kebab-case naming; use zod for parameter validation; make projectRoot optional as the HOF handles fallback; wrap execute method with `withNormalizedProjectRoot`

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Applies to assets/.claude/settings.json : Add Claude Code tool allowlist configuration in `.claude/settings.json` to include 'Edit', 'Bash(task-master *)', 'Bash(git commit:*)', 'Bash(git add:*)', 'Bash(npm run *)', and 'mcp__task_master_ai__*'

Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to .cursor/mcp.json : Add new tool definitions to the tools array in `.cursor/mcp.json`

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Applies to assets/**/CLAUDE.md : Update `CLAUDE.md` file with project-specific context, task summaries, and custom command examples for Claude Code integration

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1444
File: apps/cli/src/utils/auto-update/changelog.ts:103-111
Timestamp: 2025-11-25T18:32:29.828Z
Learning: The claude-task-master project uses a custom changelog format with PR numbers and author acknowledgements in the pattern `- [#PR](...) Thanks [author]! - Description`, which is parsed by the regex in apps/cli/src/utils/auto-update/changelog.ts.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
mcp-server/src/tools/models.js (1)

82-85: LGTM! Annotations correctly mark tool as destructive.

The destructiveHint: true is semantically accurate since the tool can modify persistent configuration state via the setMain, setResearch, and setFallback parameters. The title: 'Models' provides clear UI metadata.

Optional enhancement: Consider adding idempotentHint: true.

Setting a model configuration to the same value multiple times produces the same final state (e.g., calling setMain("claude-3-5-sonnet") twice results in the same configuration as calling it once). Adding idempotentHint: true would provide more complete semantic metadata for LLM decision-making.

🔎 Proposed enhancement
 		annotations: {
 			title: 'Models',
-			destructiveHint: true
+			destructiveHint: true,
+			idempotentHint: true
 		},
mcp-server/src/tools/add-subtask.js (1)

60-62: Consider marking projectRoot as optional.

Per coding guidelines, projectRoot should be marked as optional since withNormalizedProjectRoot HOF handles the fallback logic. This would align with the recommended pattern across MCP tools.

🔎 Suggested change
 			projectRoot: z
 				.string()
+				.optional()
 				.describe('The directory of the project. Must be an absolute path.'),

Note: This is a pre-existing pattern, not introduced by the current PR changes.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32ecabe and 812a447.

📒 Files selected for processing (22)
  • mcp-server/src/tools/add-dependency.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/add-tag.js
  • mcp-server/src/tools/add-task.js
  • mcp-server/src/tools/analyze.js
  • mcp-server/src/tools/copy-tag.js
  • mcp-server/src/tools/expand-all.js
  • mcp-server/src/tools/expand-task.js
  • mcp-server/src/tools/initialize-project.js
  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/move-task.js
  • mcp-server/src/tools/parse-prd.js
  • mcp-server/src/tools/rename-tag.js
  • mcp-server/src/tools/research.js
  • mcp-server/src/tools/response-language.js
  • mcp-server/src/tools/rules.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/scope-up.js
  • mcp-server/src/tools/update-subtask.js
  • mcp-server/src/tools/update-task.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/use-tag.js
🚧 Files skipped from review as they are similar to previous changes (16)
  • mcp-server/src/tools/copy-tag.js
  • mcp-server/src/tools/expand-all.js
  • mcp-server/src/tools/add-dependency.js
  • mcp-server/src/tools/move-task.js
  • mcp-server/src/tools/rules.js
  • mcp-server/src/tools/response-language.js
  • mcp-server/src/tools/update-subtask.js
  • mcp-server/src/tools/add-tag.js
  • mcp-server/src/tools/analyze.js
  • mcp-server/src/tools/scope-up.js
  • mcp-server/src/tools/research.js
  • mcp-server/src/tools/add-task.js
  • mcp-server/src/tools/expand-task.js
  • mcp-server/src/tools/rename-tag.js
  • mcp-server/src/tools/initialize-project.js
  • mcp-server/src/tools/parse-prd.js
🧰 Additional context used
📓 Path-based instructions (8)
mcp-server/src/tools/*.js

📄 CodeRabbit inference engine (.cursor/rules/architecture.mdc)

mcp-server/src/tools/*.js: MCP tool execute methods should be wrapped with the withNormalizedProjectRoot HOF to ensure consistent path handling and provide a normalized args.projectRoot to the execute method
MCP tool definitions should define projectRoot parameter as optional: projectRoot: z.string().optional().describe(...)
MCP tool execute methods should use getProjectRootFromSession to obtain rootFolder with fallback to args.projectRoot

mcp-server/src/tools/*.js: Use snake_case for MCP tool names exposed to clients (e.g., list_tasks, set_task_status)
Use camelCase with Tool suffix for tool registration functions (e.g., registerListTasksTool)
Include projectRoot as an optional parameter in tool definitions using zod schema
Wrap the entire execute function of an MCP tool with the withNormalizedProjectRoot Higher-Order Function to ensure consistent handling of project paths across different environments
Call the corresponding *Direct function wrapper from task-master-core.js within the execute method of each MCP tool, passing necessary arguments and the logger
Use handleApiResult utility to format the result from a *Direct function into a standard MCP response, which automatically handles data processing via processMCPResponseData
Use the AsyncOperationManager in the MCP tool layer for operations involving multiple steps or long waits beyond a single AI call; simple AI calls handled entirely within the *Direct function may not need it
Access API keys for AI services via the session.env object in the MCP context rather than reading environment variables directly
Use createErrorResponse and createContentResponse utilities from tools/utils.js for formatting MCP responses
Include and return the fromCache boolean flag from the *Direct function result alongside the actual data in the MCP response
Use the initialize_project tool for setting up new projects in integrated environments without requiring a project root

mcp-server/src/tools/*.js: Create MCP tool definit...

Files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
**/*.js

📄 CodeRabbit inference engine (.cursor/rules/architecture.mdc)

**/*.js: Always use isSilentMode() function to check current silent mode status instead of directly accessing the global silentMode variable or global.silentMode
Use try/finally block pattern when wrapping core function calls with enableSilentMode/disableSilentMode to ensure silent mode is always restored, even if errors occur
For functions that need to handle both a passed silentMode parameter and check global state, check both the function parameter and global state: const isSilent = options.silentMode || (typeof options.silentMode === 'undefined' && isSilentMode())
Functions should accept their dependencies as parameters rather than using globals to promote testability and explicit dependency injection
Define callbacks as separate functions for easier testing rather than inline functions

Files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
mcp-server/src/**/*.js

📄 CodeRabbit inference engine (.cursor/rules/mcp.mdc)

mcp-server/src/**/*.js: Use kebab-case for all file names in the MCP server structure (e.g., list-tasks.js, set-task-status.js)
Log the start of execution with sanitized arguments, log successful completion with result summary including cache status, and log all error conditions with appropriate log levels
Do not log entire large data structures or sensitive information in direct functions and tools

Files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
mcp-server/src/tools/**/*.js

📄 CodeRabbit inference engine (.cursor/rules/telemetry.mdc)

MCP tools in mcp-server/src/tools/ must call the corresponding direct function wrapper and pass the result object to handleApiResult(result, log) from mcp-server/src/tools/utils.js

Files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
**/*.{js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)

JavaScript test files using Jest must follow the same testing patterns as TypeScript files, include proper mocking of external dependencies, and achieve the same coverage thresholds

Files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
**/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
mcp-server/src/**/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

mcp-server/src/**/*.{js,ts}: Use the logger wrapper pattern when passing loggers to prevent mcpLog[level] is not a function errors, wrapping FastMCP's log object with standard methods
Use normalizeProjectRoot(rawPath, log) to take a raw project root path (potentially URI encoded, with file:// prefix) and return a normalized, absolute path
Use createContentResponse(content) and createErrorResponse(errorMessage) helper functions to create basic MCP response structures
Use createLogWrapper(log) to create a logger object wrapper with standard methods mapping to the passed MCP log object's methods

Files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
mcp-server/src/tools/**/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

mcp-server/src/tools/**/*.{js,ts}: Use the withNormalizedProjectRoot Higher-Order Function to wrap tool execute methods, ensuring normalized project root is injected into args
Use handleApiResult(result, log, errorPrefix, processFunction) to standardize the formatting of responses returned by direct functions into the MCP response format
Use processMCPResponseData(taskOrData, fieldsToRemove) utility to filter potentially sensitive or large fields (like details, testStrategy) from task objects before sending responses

Files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
🧠 Learnings (38)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Applies to assets/.claude/settings.json : Add Claude Code tool allowlist configuration in `.claude/settings.json` to include 'Edit', 'Bash(task-master *)', 'Bash(git commit:*)', 'Bash(git add:*)', 'Bash(npm run *)', and 'mcp__task_master_ai__*'
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/tools/*.js : In MCP tool registration, include optional tag parameter for multi-context support in the Zod schema
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: New MCP tools should be imported and registered in mcp-server/src/tools/index.js and tool definitions should be added to mcp.json

Applied to files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/tools/index.js : Import and call tool registration functions in mcp-server/src/tools/index.js to register new MCP tools with the server

Applied to files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/tools/index.js : Register MCP tools by importing and calling registration functions in `mcp-server/src/tools/index.js`

Applied to files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/tools/*.js : Use camelCase with Tool suffix for tool registration functions (e.g., registerListTasksTool)

Applied to files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to .cursor/mcp.json : Add new tool definitions to the tools array in `.cursor/mcp.json`

Applied to files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/tools/*.js : In MCP tool registration, include optional tag parameter for multi-context support in the Zod schema

Applied to files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/tools/*.js : Include projectRoot as an optional parameter in tool definitions using zod schema

Applied to files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/tools/*.js : Create MCP tool definitions in `mcp-server/src/tools/` using kebab-case naming; use zod for parameter validation; make projectRoot optional as the HOF handles fallback; wrap execute method with `withNormalizedProjectRoot`

Applied to files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
📚 Learning: 2025-11-24T17:57:14.743Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_providers.mdc:0-0
Timestamp: 2025-11-24T17:57:14.743Z
Learning: Use the `models` MCP tool or the `task-master models` CLI command to manage AI configurations

Applied to files:

  • mcp-server/src/tools/models.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/tools/*.js : Use snake_case for MCP tool names exposed to clients (e.g., list_tasks, set_task_status)

Applied to files:

  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : In MCP direct functions, support explicit tag specification and use tag resolution for task data operations; default to current tag when not specified

Applied to files:

  • mcp-server/src/tools/use-tag.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Pass context object `{ projectRoot, tag }` to all core functions that read or write tasks

Applied to files:

  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/*/[!.]* : Every CLI command that operates on tasks must include a `--tag <tag>` CLI option

Applied to files:

  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/add-subtask.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/commands.js : In CLI commands, use specified tag context or default to current tag; call appropriate core functions with options including targetTag and outputFormat parameters

Applied to files:

  • mcp-server/src/tools/use-tag.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to mcp-server/src/tools/**/*.{js,ts} : Use the withNormalizedProjectRoot Higher-Order Function to wrap tool execute methods, ensuring normalized project root is injected into args

Applied to files:

  • mcp-server/src/tools/use-tag.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/*/[!.]* : Tag resolution must follow the priority order: explicit `--tag` flag, then `getCurrentTag(projectRoot)`, then default to 'master'

Applied to files:

  • mcp-server/src/tools/use-tag.js
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • mcp-server/src/tools/add-subtask.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Include all required task properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) in each task object without adding extra properties outside the standard schema

Applied to files:

  • mcp-server/src/tools/add-subtask.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • mcp-server/src/tools/add-subtask.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Follow the provided structure for adding subtasks, including required options and detailed error handling.

Applied to files:

  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:00:06.827Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:06.827Z
Learning: Create a new task tag when a user creates a new git branch (e.g., `task-master add-tag feature-user-auth` for branch `feature/user-auth`)

Applied to files:

  • mcp-server/src/tools/add-subtask.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Use `readJSON(tasksPath, projectRoot, tag)` and `writeJSON(tasksPath, data, projectRoot, tag)` for all task data access

Applied to files:

  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to mcp-server/src/tools/*.js : MCP tool definitions should define projectRoot parameter as optional: projectRoot: z.string().optional().describe(...)

Applied to files:

  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/scope-down.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • mcp-server/src/tools/update.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • mcp-server/src/tools/update.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to tasks.json : Organize tasks into separate contexts (tags) within tasks.json using tagged format: {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}} instead of legacy format {"tasks": [...]}

Applied to files:

  • mcp-server/src/tools/update.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • mcp-server/src/tools/update.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • mcp-server/src/tools/update.js
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Suggest non-destructive alternatives (like status changes instead of deletion) when appropriate in delete commands, with examples of alternative commands

Applied to files:

  • mcp-server/src/tools/scope-down.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Suggest non-destructive alternatives when appropriate, explain the difference between deletion and status changes, and include examples of alternative commands.

Applied to files:

  • mcp-server/src/tools/scope-down.js
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup

Applied to files:

  • mcp-server/src/tools/scope-down.js
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Regenerate task files after destructive operations by explicitly passing all required parameters to generation functions; provide a --skip-generate option if needed

Applied to files:

  • mcp-server/src/tools/scope-down.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to mcp-server/src/tools/**/*.{js,ts} : Use processMCPResponseData(taskOrData, fieldsToRemove) utility to filter potentially sensitive or large fields (like details, testStrategy) from task objects before sending responses

Applied to files:

  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to mcp-server/src/tools/*.js : MCP tool execute methods should be wrapped with the withNormalizedProjectRoot HOF to ensure consistent path handling and provide a normalized args.projectRoot to the execute method

Applied to files:

  • mcp-server/src/tools/update-task.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (5)
mcp-server/src/tools/update.js (1)

50-53: LGTM! Appropriate annotations for a destructive operation.

The annotations correctly identify this tool as destructive since it modifies task data. The title provides clear UI-friendly text, and destructiveHint: true accurately signals that this operation changes state. This metadata addition enhances LLM decision-making without affecting the tool's functional behavior.

mcp-server/src/tools/scope-down.js (1)

53-56: LGTM! Previous review concern addressed.

The annotations correctly mark this tool as destructive, which is appropriate since scopeDownDirect modifies task complexity and state. The addition of destructiveHint: true addresses the previous review feedback and aligns with the PR's goal of helping LLMs distinguish state-changing operations.

mcp-server/src/tools/use-tag.js (1)

33-36: LGTM! Appropriate annotation metadata added.

The destructiveHint: true classification is correct for this tool since switching tag context is a state-changing operation. The human-readable title clearly describes the tool's purpose.

mcp-server/src/tools/add-subtask.js (1)

65-68: LGTM! Annotations correctly identify tool behavior.

The addition of annotations with destructiveHint: true accurately reflects that this tool modifies state by adding subtasks to tasks.json. The title is clear and appropriate for UI display.

mcp-server/src/tools/update-task.js (1)

50-53: LGTM! Annotations correctly identify the tool as destructive.

The annotations are appropriate for an update operation:

  • The destructiveHint: true correctly identifies this as a state-changing operation
  • The title is clear and descriptive
  • Aligns with the PR objective to help LLMs distinguish read-only queries from state-changing operations

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

annotations: {
title: 'Resume Autopilot Workflow',
readOnlyHint: true
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Resume tool incorrectly marked as read-only

The autopilot_resume tool has readOnlyHint: true but actually modifies state. Looking at resumeWorkflow() implementation, it creates a new orchestrator, restores state, enables auto-persistence (writes to disk), and starts an activity logger (writes to files). The description confirms this: "Restores the workflow state machine and continues from where it left off." This incorrect annotation could cause LLMs to treat this as a safe-to-call operation when it has side effects, and should likely use destructiveHint: true instead.

Fix in Cursor Fix in Web

annotations: {
title: 'Get Next Autopilot Action',
readOnlyHint: true
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Next action tool calls resume, not read-only

The autopilot_next tool has readOnlyHint: true but internally calls tmCore.workflow.resume() on line 56, which creates a new orchestrator, restores state, enables auto-persistence to disk, and starts an activity logger. Since resume() has side effects, this tool is incorrectly classified as read-only. LLMs may treat it as safe to call freely when it actually modifies internal state and triggers file writes.

Fix in Cursor Fix in Web

annotations: {
title: 'Get Autopilot Status',
readOnlyHint: true
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Status tool calls resume, not read-only

The autopilot_status tool has readOnlyHint: true but internally calls tmCore.workflow.resume() on line 56, which creates a new orchestrator, restores state, enables auto-persistence to disk, and starts an activity logger. Since resume() has side effects, this tool is incorrectly classified as read-only. LLMs may treat it as safe to call freely when it actually modifies internal state and triggers file writes.

Fix in Cursor Fix in Web

@Crunchyman-ralph Crunchyman-ralph merged commit 9a6fa1b into eyaltoledano:next Jan 2, 2026
10 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jan 2, 2026
16 tasks
Crunchyman-ralph added a commit that referenced this pull request Jan 6, 2026
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: triepod-ai <noreply@github.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: triepod-ai <199543909+triepod-ai@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Jan 11, 2026
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.

4 participants