Skip to content

feat: add 18 task MCP tools (scheduling, lifecycle, project mgmt, sta…#618

Open
bmestrallet wants to merge 2 commits into
developfrom
feat/task-mcp-tools
Open

feat: add 18 task MCP tools (scheduling, lifecycle, project mgmt, sta…#618
bmestrallet wants to merge 2 commits into
developfrom
feat/task-mcp-tools

Conversation

@bmestrallet

Copy link
Copy Markdown

What & why

Expands the Task add-on's MCP tool surface so EVA can act on tasks and projects, not just read them. Adds 18 new tools entirely within this repo (io.meeds.task.mcp.TaskMcpTool + services/src/main/resources/ai-tool-definitions.json), taking the catalog from 23 → 41. Backend-only; no AI/MCP-repo change.

Each tool runs as the calling user (platform ACLs apply); write tools are flagged require_approval.

Tools added

⏱️ Scheduling & lifecycle

  • set_task_dates — set/clear start, end and/or due dates
  • complete_task / reopen_task — toggle the completed flag (distinct from the status column)
  • set_task_priority — NONE/LOW/NORMAL/HIGH/URGENT
  • list_unscheduled_tasks (read) — tasks with no due date, optionally per project

🗂️ Project management

  • update_project — name / description / colour (only provided fields change)
  • add_project_member / remove_project_member
  • set_project_manager / remove_project_manager
  • create_project_status / rename_project_status

📊 Reporting

  • get_project_statistics (read) — uncompleted-task counts, total + per status (new ProjectStatisticsModel)

⭐ Favorites

  • favorite_project / unfavorite_project, favorite_task / unfavorite_task (social FavoriteService)

  • delete_task_comment — author or task-editor only

Implementation notes

  • New helpers wrap permission checks: getEditableTask / getEditableProject / getViewableProject / getAccessibleTask.
  • FavoriteService injected into TaskMcpTool; favorites use object types project/task with parentObjectId = null (same as the favorites REST).
  • Member/manager tools add the bare username to the project's participator/manager set (membership expressions untouched).
  • Relies on the already-configured -parameters javac flag so snake_case schema args bind to the method params.

Testing

  • 12 new unit tests in TaskMcpToolTest (happy paths + a permission-denied case) → 49 passing, 0 failures; mvn install -pl services → BUILD SUCCESS.
  • Verified live against a running platform: deploying the jar took the MCP server from Registered tools: 77 → 95; an OAuth-authenticated tools/list showed all 18 new tools; get_project_statistics returned real data ({total_uncompleted_tasks: 105, uncompleted_by_status: {ToDo: 102, …}}); and the favorite_project/unfavorite_project write path executed as the user and self-reversed.

Not included

  • Comment editingCommentService exposes only add/remove (no update), so only delete_task_comment ships.
  • AI UX bindings — designed but deferred to a follow-up.

Links

…ts, favorites)

Extends io.meeds.task.mcp.TaskMcpTool (+ ai-tool-definitions.json) with tools the
AI/EVA assistant was missing. All writes are require_approval=true, all reuse the
existing services + ACL checks (edit/access/view permission helpers).

Scheduling & lifecycle:
- set_task_dates (reschedule an existing task; create already took dates, this sets
  them on an existing one), complete_task / reopen_task (the `completed` flag, which
  is distinct from the status column), set_task_priority, list_unscheduled_tasks
  (uncompleted tasks with neither a start nor a due date — the Plan-view bucket).

Project management:
- update_project (name/description/colour), add_project_member /
  remove_project_member (participators), set_project_manager /
  remove_project_manager, create_project_status / rename_project_status.

Reporting & favorites & comments:
- get_project_statistics (uncompleted task counts per status + total; new
  ProjectStatisticsModel), favorite_project / unfavorite_project / favorite_task /
  unfavorite_task (via the social FavoriteService, now injected), delete_task_comment.

Note: task-comment editing is intentionally omitted — CommentService exposes only
addComment/removeComment, no update.

41 tools total. 12 new unit tests in TaskMcpToolTest (49 passing). Services build
green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t label)

Adds list_task_labels (read), update_project_label (rename) and
delete_project_label to complete label management; catalog 41 -> 44.
Reuses LabelService + project-edit ACL via a new getEditableLabel helper.
+4 unit tests (53 passing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant