Skip to main content
Glama

taskDelete

Remove tasks by ID from the MCP server to manage workflow and maintain organized project structures.

Instructions

刪除指定ID的任務

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • main.ts:687-709 (registration)
    Registration of the taskDelete MCP tool, including input schema { id: z.string() } and the handler function that calls TaskManagerTool.deleteTask(id) and returns formatted response.
    server.tool("taskDelete",
        "刪除指定ID的任務",
        { id: z.string() },
        async ({ id }) => {
            try {
                const result = await TaskManagerTool.deleteTask(id);
    
                if (!result) {
                    return {
                        content: [{ type: "text", text: `未找到ID為 ${id} 的任務` }]
                    };
                }
    
                return {
                    content: [{ type: "text", text: `任務已成功刪除` }]
                };
            } catch (error) {
                return {
                    content: [{ type: "text", text: `刪除任務失敗: ${error instanceof Error ? error.message : "未知錯誤"}` }]
                };
            }
        }
    );
  • Core implementation of task deletion: reads all tasks, filters out the one matching the ID, writes back the list if changed, returns success boolean.
    public static async deleteTask(id: string): Promise<boolean> {
      const tasks = await this.readTasks();
      const initialLength = tasks.length;
    
      const filteredTasks = tasks.filter(t => t.id !== id);
    
      if (filteredTasks.length === initialLength) {
        return false;
      }
    
      // 保存所有任務
      await this.writeTasks(filteredTasks);
    
      return true;
    }
  • Zod input schema for taskDelete tool: requires 'id' as string.
    { id: z.string() },
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the basic action ('delete') without any information about permissions required, whether deletion is permanent or reversible, side effects (e.g., if related data like task steps are also deleted), error handling, or response format. This is inadequate for a destructive operation with zero annotation coverage.

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 with a single sentence that directly states the tool's purpose. There is no wasted verbiage or unnecessary elaboration, making it front-loaded and efficient for quick understanding.

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

Completeness1/5

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

Given the tool's destructive nature (deletion), lack of annotations, no output schema, and incomplete parameter documentation (0% schema coverage with no compensation in the description), the description is severely inadequate. It doesn't address critical aspects like safety, permissions, or what happens post-deletion, leaving the agent with insufficient context to use it correctly.

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

Parameters2/5

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

The schema description coverage is 0%, meaning the single parameter 'id' is undocumented in the schema. The description adds no information about this parameter beyond implying it's for a 'specified ID'—it doesn't explain the ID format, source, or validation rules. With low schema coverage, the description fails to compensate for the documentation gap.

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

Purpose4/5

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

The description clearly states the action ('刪除' meaning 'delete') and the resource ('任務' meaning 'task'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from other task-related siblings like 'taskStepDelete' or 'localizationDelete', which would require mentioning it's for deleting entire tasks rather than task steps or localization entries.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid task ID), exclusions, or comparisons to sibling tools like 'taskStepDelete' for partial deletions or 'taskUpdate' for modifications instead of removal.

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/GonTwVn/GonMCPtool'

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