Skip to content

docs: update README with batch operations and list_tasks tool#3

Merged
evalor merged 3 commits intofeature/batch-operationsfrom
copilot/add-batch-operations-support
Nov 25, 2025
Merged

docs: update README with batch operations and list_tasks tool#3
evalor merged 3 commits intofeature/batch-operationsfrom
copilot/add-batch-operations-support

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

Updates documentation to reflect the batch operations implementation that was completed in prior commits.

Documentation Updates

  • Tool count: 14 → 15 (added list_tasks)
  • Tools table: Added list_tasks, updated task tools to show batch support and new tasks[] parameter format
  • Project structure: Added utils/batch.ts to directory tree
  • Roadmap: Marked as complete:
    • Batch operations support (create/update/delete/complete)
    • List tasks with filtering
    • Inbox task operations
  • Read-only mode: Added list_tasks to allowed operations list
  • Grammar fix: Improved sentence structure in tools section

Batch Operations Summary (already implemented)

Tool Batch Support
list_tasks Cross-project queries, date/priority filters, max 200 results
create_task tasks[] array, description auto-maps to content/desc
update_task tasks[] array, partial updates
delete_task tasks[] array, idempotent
complete_task tasks[] array, idempotent
// Example batch create
{ "tasks": [
  { "title": "Task 1", "projectId": "inbox", "priority": 3 },
  { "title": "Task 2", "projectId": "proj123", "dueDate": "2025-11-25T18:00:00+0800" }
]}
Original prompt

feat: Batch Operations Support & Task Tool Improvements

概述

本次 PR 为 Dida365 MCP Server 添加了批量操作支持,并改进了任务工具的文档和 API 字段处理。

主要变更

🚀 新功能

1. 批量操作支持

  • 新增 list_tasks 工具 - 支持跨项目任务列表查询,包含多种过滤选项:
    • 按项目过滤 (支持多个项目ID或 "inbox")
    • 预设日期过滤 (today, tomorrow, thisWeek, overdue)
    • 自定义日期范围过滤 (dueDateFrom, dueDateTo)
    • 优先级过滤 (priority)
    • 排序支持 (sortBy, sortOrder)
    • 结果限制 (limit, 最大200条)

2. 批量任务操作

重构以下工具支持批量操作:

  • create_task - 支持一次创建多个任务
  • update_task - 支持一次更新多个任务
  • delete_task - 支持一次删除多个任务
  • complete_task - 支持一次完成多个任务

3. 批量执行工具库 (src/utils/batch.ts)

  • batchExecute() - 并发执行控制 (默认最大5个并发)
  • formatBatchResults() - 创建/更新操作结果格式化
  • formatBatchResultsSimple() - 完成/删除操作结果格式化
  • 错误分类和重试建议 (errorType, retryable)

📝 API 字段优化

统一 description 字段

  • 新增统一的 description 参数,自动映射到正确的 API 字段:
    • TEXT 任务 (无子任务): 映射到 content 字段
    • CHECKLIST 任务 (有子任务): 映射到 desc 字段
  • 用户无需了解底层 API 的 content/desc 区别

响应字段文档改进

get_tasklist_tasks 添加响应字段说明:

  • content - TEXT 任务的描述
  • desc - CHECKLIST 任务的描述
  • kind - 任务类型 ("TEXT" 或 "CHECKLIST")
  • items - 子任务列表 (仅 CHECKLIST 任务)

🔧 Bug 修复

  • 修复 inbox 任务获取问题 - 改进 inbox 任务的获取和错误处理
  • 改进错误处理 - 统一的授权错误检测和提示

📚 文档更新

  • complete_taskdelete_task 添加幂等性说明
  • 添加 content 字段在 CHECKLIST 任务中的限制说明
  • 更新工具描述,清晰说明字段映射逻辑

文件变更

文件 变更类型 说明
src/utils/batch.ts 新增 批量执行工具库
src/tools/task/list-tasks.ts 新增 任务列表查询工具
src/tools/task/create-task.ts 重构 支持批量创建 + description 字段
src/tools/task/update-task.ts 重构 支持批量更新 + description 字段
src/tools/task/delete-task.ts 重构 支持批量删除
src/tools/task/complete-task.ts 重构 支持批量完成
src/tools/task/get-task.ts 更新 添加响应字段文档
src/tools/index.ts 更新 注册新工具
src/utils/index.ts 更新 导出批量工具

提交历史

  1. fix: resolve inbox task fetching and improve error handling
  2. docs: add idempotency notes to complete_task and delete_task
  3. docs: add warning about content field limitation for checklist tasks
  4. docs: clarify content vs desc field usage based on task type
  5. feat: unify content/desc into single 'description' field with auto-mapping
  6. docs: simplify description field docs in task tools

测试验证

✅ 授权状态检查 (check_auth_status)
✅ 项目列表查询 (list_projects)
✅ 任务列表查询 (list_tasks)
✅ 批量创建任务 (create_task)
✅ 批量完成任务 (complete_task)

向后兼容性

  • 所有工具保持向后兼容
  • 单任务操作仍然使用相同的参数格式(包装在数组中)
  • 现有的 content/desc 字段在响应中仍然可用

Created from VS Code via the GitHub Pull Request extension.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 25, 2025
Copilot AI and others added 2 commits November 25, 2025 11:21
Co-authored-by: evalor <26944445+evalor@users.noreply.github.com>
Co-authored-by: evalor <26944445+evalor@users.noreply.github.com>
Copilot AI changed the title [WIP] Add batch operations support and task tool improvements docs: update README with batch operations and list_tasks tool Nov 25, 2025
Copilot AI requested a review from evalor November 25, 2025 11:25
Copy link
Owner

@evalor evalor left a comment

Choose a reason for hiding this comment

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

No problem, ready to merge.

@evalor evalor marked this pull request as ready for review November 25, 2025 11:29
Copilot AI review requested due to automatic review settings November 25, 2025 11:29
Copy link
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

This PR updates the README documentation to reflect the completed batch operations feature and the new list_tasks tool that were implemented in prior commits.

  • Updated tool count from 14 to 15 tools
  • Added list_tasks to the tools table and read-only mode operations list
  • Updated task tools documentation to reflect batch operation support with tasks[] parameter format
  • Added utils/batch.ts to the project structure diagram
  • Marked batch operations, task listing, and inbox operations as completed in the roadmap
  • Improved grammar in the English README

Reviewed changes

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

File Description
README.md Updated tool count, tools table, project structure, roadmap, and read-only mode documentation; improved grammar
README_zh.md Updated tool count, tools table, project structure, roadmap, and read-only mode documentation (Chinese version)

@evalor
Copy link
Owner

evalor commented Nov 25, 2025

@copilot Squash and merge, merge the content of the feature/batch-operations branch into the master branch and delete this feature branch.

Copy link
Contributor Author

Copilot AI commented Nov 25, 2025

@copilot Squash and merge, merge the content of the feature/batch-operations branch into the master branch and delete this feature branch.

I'm not able to perform git merge operations or delete branches directly. You can squash and merge this PR using GitHub's UI:

  1. Click the "Squash and merge" button on this PR page
  2. After merging, GitHub will offer to delete the feature branch, or you can delete it manually from the branches page

Let me know if you need any other changes to the code before merging.

Copilot AI requested a review from evalor November 25, 2025 11:38
@evalor evalor merged commit 23d130e into feature/batch-operations Nov 25, 2025
7 checks passed
evalor added a commit that referenced this pull request Nov 25, 2025
* Initial plan

* docs: update README with batch operations and list_tasks tool

Co-authored-by: evalor <26944445+evalor@users.noreply.github.com>

* docs: fix grammar in README.md

Co-authored-by: evalor <26944445+evalor@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: evalor <26944445+evalor@users.noreply.github.com>
@evalor evalor deleted the copilot/add-batch-operations-support branch November 25, 2025 12:13
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.

3 participants