Skip to main content
Glama
ZH1754629545

TickTick/Dida365 MCP Server

by ZH1754629545

delete_task

Remove a task from a TickTick/Dida365 project using its task ID and project ID. This action permanently deletes the specified task and returns a confirmation upon successful completion.

Instructions

Permanently delete a task from a project. Requires both task ID and project ID for confirmation. Returns success message upon deletion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesThe ID of the task to delete (required)
projectIdYesThe ID of the project containing the task (required)

Implementation Reference

  • Handler for the 'delete_task' tool: extracts taskId and projectId from arguments, validates them using throwValidError, deletes the task via dida365Api.delete, and returns a success message.
    case "delete_task": { const taskId = args.taskId as string; const projectId = args.projectId as string; throwValidError(projectId,taskId); await dida365Api.delete(`/project/${projectId}/task/${taskId}`); return { content: [ { type: "text", text: `任务 ${taskId} 删除成功`, }, ], }; }
  • src/index.ts:204-221 (registration)
    Registration of the 'delete_task' tool including its name, description, and input schema definition in the tools array passed to the MCP server.
    { name: "delete_task", description: "Permanently delete a task from a project. Requires both task ID and project ID for confirmation. Returns success message upon deletion.", inputSchema: { type: "object", properties: { taskId: { type: "string", description: "The ID of the task to delete (required)", }, projectId: { type: "string", description: "The ID of the project containing the task (required)" } }, required: ["taskId","projectId"], }, },
  • Helper validation function used in delete_task (and others) to ensure projectId and taskId are provided.
    function throwValidError(projectId : string,taskId : string){ if(!projectId&&!taskId) throw new McpError(ErrorCode.InvalidRequest,"projectId 和 taskId 为空") if(!projectId) throw new McpError(ErrorCode.InvalidRequest,"projectId 为空") if(!taskId) throw new McpError(ErrorCode.InvalidRequest,"taskId 为空") }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZH1754629545/dida365-mcp-servers'

If you have feedback or need assistance with the MCP directory API, please join our Discord server