Skip to content

Improve MCP tools: update descriptions, add due-before and label filtering#254

Merged
dkhalife merged 2 commits intomainfrom
update_mcp_tools
Mar 22, 2026
Merged

Improve MCP tools: update descriptions, add due-before and label filtering#254
dkhalife merged 2 commits intomainfrom
update_mcp_tools

Conversation

@dkhalife
Copy link
Copy Markdown
Owner

Changes

MCP tool description improvements

  • ListTasks: Clarified that it returns all active (not completed) tasks
  • UpdateTask: Added warning that omitted optional properties will be cleared/reset on the task

New MCP tools & API routes

  • ListTasksDueBefore: Lists active tasks due before a given UTC timestamp (RFC 3339 / ISO 8601 format)
  • ListTasksByLabel: Lists active tasks tagged with a specific label ID

Backend support

  • Added \GET /api/v1/tasks/due?before=\ API route
  • Added \GET /api/v1/tasks/label/:labelId\ API route
  • Added \GetTasksDueBefore\ and \GetTasksByLabel\ methods to the task repository and service layers
  • Reused existing query patterns, label preloading, and auth middleware

Copilot AI review requested due to automatic review settings March 21, 2026 22:14
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 22.72727% with 51 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
apiserver/internal/apis/task.go 0.00% 29 Missing ⚠️
apiserver/internal/services/tasks/task.go 0.00% 18 Missing ⚠️
apiserver/internal/repos/task/task.go 78.94% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

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 the MCP task tooling by clarifying existing tool behavior and adding two new task-listing capabilities (due-before and label-filtered), backed by new Go API endpoints and repository/service queries.

Changes:

  • Clarified MCP tool descriptions for listing tasks and updating tasks.
  • Added MCP tools to list active tasks due before a timestamp and active tasks by label ID.
  • Added API routes plus service/repository methods to support due-before and label filtering queries.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
mcpserver/Tools/TaskTools.cs Updates tool descriptions; adds ListTasksDueBefore and ListTasksByLabel MCP tools.
mcpserver/Services/ApiProxyService.cs Adds proxy methods calling the new backend routes.
apiserver/internal/apis/task.go Adds GET /api/v1/tasks/due and GET /api/v1/tasks/label/:labelId handlers + route registration.
apiserver/internal/services/tasks/task.go Adds service methods to return filtered task lists with consistent error handling.
apiserver/internal/repos/task/task.go Adds GORM queries for due-before filtering and label join filtering.

Comment thread apiserver/internal/repos/task/task.go
Comment thread apiserver/internal/repos/task/task.go
@dkhalife dkhalife merged commit e2c9b90 into main Mar 22, 2026
7 checks passed
@dkhalife dkhalife deleted the update_mcp_tools branch March 22, 2026 00:19
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