Skip to main content
Glama

delete_task

Remove a specific task from Dida365 projects using its task_id and project_id. This action permanently deletes the task and cannot be undone.

Instructions

删除指定任务。⚠️ 此操作不可恢复。需要提供 task_id 和 project_id。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes任务ID
project_idYes项目ID

Implementation Reference

  • The actual implementation of the delete_task logic which calls the Dida365 API to delete a task.
    def delete_task(self, project_id: str, task_id: str) -> bool:
        """删除任务"""
        response = self.client.delete(
            f"/project/{project_id}/task/{task_id}"
        )
        response.raise_for_status()
        return True
  • The core logic that performs the API call to delete a task.
    def delete_task(self, project_id: str, task_id: str) -> bool:
        """删除任务"""
        response = self.client.delete(
            f"/project/{project_id}/task/{task_id}"
        )
        response.raise_for_status()
        return True
  • The tool handler in the MCP server that parses arguments and calls the client's delete_task method.
    elif name == "delete_task":
        client.delete_task(
            project_id=args["project_id"],
            task_id=args["task_id"],
        )
        return "✅ 任务 %s 已删除。" % args["task_id"]
  • The registration of the 'delete_task' tool with its input schema.
    "name": "delete_task",
    "description": "删除指定任务。⚠️ 此操作不可恢复。需要提供 task_id 和 project_id。",
    "inputSchema": {
        "type": "object",
        "properties": {
            "task_id": {"type": "string", "description": "任务ID"},
            "project_id": {"type": "string", "description": "项目ID"},
        },
        "required": ["task_id", "project_id"],
  • The handler block that processes the 'delete_task' tool request and calls the client.
    elif name == "delete_task":
        client.delete_task(
            project_id=args["project_id"],
            task_id=args["task_id"],
        )
        return "✅ 任务 %s 已删除。" % args["task_id"]
  • The registration definition for the delete_task tool in the MCP server.
        "name": "delete_task",
        "description": "删除指定任务。⚠️ 此操作不可恢复。需要提供 task_id 和 project_id。",
        "inputSchema": {
            "type": "object",
            "properties": {
                "task_id": {"type": "string", "description": "任务ID"},
                "project_id": {"type": "string", "description": "项目ID"},
            },
            "required": ["task_id", "project_id"],
        },
    },

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/Martinqi826/dida-mcp'

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