Skip to main content
Glama
ZH1754629545

TickTick/Dida365 MCP Server

by ZH1754629545

delete_project_by_projectID

Permanently delete a TickTick/Dida365 project and all its tasks using the project ID. This action removes the project and its contents from your task management system.

Instructions

Permanently delete a project by its ID. This will also delete all tasks within the project. Returns success message upon deletion.

Input Schema

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

Implementation Reference

  • The core handler logic for the 'delete_project_by_projectID' tool. It extracts the projectId from arguments, validates it using throwValidError helper, performs a DELETE request to the Dida365 API endpoint `/project/${projectId}`, and returns a success message with the API response data.
    case "delete_project_by_projectID":{ const projectId:string = args.projectId as string; throwValidError(projectId,"1"); const response: AxiosResponse = await dida365Api.delete(`/project/${projectId}`); return { content: [ { type: "text", text: `删除项目成功: ${JSON.stringify(response.data, null, 2)}`, }, ], }; }
  • The input schema definition for the 'delete_project_by_projectID' tool, specifying that it requires a 'projectId' string parameter.
    inputSchema: { type: "object", properties: { projectId:{ type: "string", description: "The ID of the project to delete (required)" } }, required: ["projectId"], },
  • src/index.ts:327-340 (registration)
    The tool registration entry in the ListTools response, defining the name, description, and input schema for 'delete_project_by_projectID'.
    { name: "delete_project_by_projectID", description: "Permanently delete a project by its ID. This will also delete all tasks within the project. Returns success message upon deletion.", inputSchema: { type: "object", properties: { projectId:{ type: "string", description: "The ID of the project to delete (required)" } }, required: ["projectId"], }, }
  • Helper function used for input validation in the handler (and others). Checks if projectId and/or taskId are provided, throwing McpError if missing. Called with dummy taskId '1' in this tool's handler.
    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