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"],
        },
    },
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It clearly discloses the destructive nature ('此操作不可恢复' - this operation cannot be recovered) which is crucial behavioral information. It also mentions the required parameters, though this overlaps with the schema. It doesn't cover other behavioral aspects like permissions, rate limits, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - just two sentences that each earn their place. The first states the purpose, the second provides critical warning and parameter requirements. No wasted words, perfectly front-loaded with the most important information first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive operation with no annotations and no output schema, the description does well by emphasizing irreversibility. However, it doesn't explain what happens after deletion (confirmation? error handling?) or potential side effects. Given the high-stakes nature of deletion, more context about consequences would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters adequately. The description mentions the parameters but doesn't add meaningful semantic context beyond what's in the schema descriptions ('任务ID' and '项目ID'). The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('删除指定任务' - delete specified task) and resource ('任务' - task), distinguishing it from siblings like update_task or complete_task. It's precise about what the tool does without being tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the warning about irreversibility, suggesting this should be used cautiously. However, it doesn't explicitly state when to use this versus alternatives like update_task or complete_task, nor does it mention prerequisites beyond the required parameters.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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