Skip to main content
Glama

delete_task

Remove a specific task from a project by providing the project ID and task ID in the taskqueue-mcp server.

Instructions

Remove a task from a project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe ID of the project containing the task (e.g., proj-1).
taskIdYesThe ID of the task to delete (e.g., task-1).

Implementation Reference

  • The ToolExecutor implementation for 'delete_task', which validates input parameters projectId and taskId, then delegates execution to TaskManager.deleteTask.
    const deleteTaskToolExecutor: ToolExecutor = {
      name: "delete_task",
      async execute(taskManager, args) {
        // 1. Argument Validation
        const projectId = validateProjectId(args.projectId);
        const taskId = validateTaskId(args.taskId);
    
        // 2. Core Logic Execution
        const resultData = await taskManager.deleteTask(projectId, taskId);
    
        // 3. Return raw success data
        return resultData;
      },
    };
    toolExecutorMap.set(deleteTaskToolExecutor.name, deleteTaskToolExecutor);
  • The Tool object definition for 'delete_task' including name, description, and input schema requiring projectId and taskId.
    /**
     * Delete Task Tool
     * @param {object} args - A JSON object containing the arguments
     * @see {deleteTaskToolExecutor}
     */
    const deleteTaskTool: Tool = {
      name: "delete_task",
      description: "Remove a task from a project.",
      inputSchema: {
        type: "object",
        properties: {
          projectId: {
            type: "string",
            description: "The ID of the project containing the task (e.g., proj-1).",
          },
          taskId: {
            type: "string",
            description: "The ID of the task to delete (e.g., task-1).",
          },
        },
        required: ["projectId", "taskId"],
      },
    };
  • The core TaskManager.deleteTask method that locates the task in the project, checks preconditions (not completed project, not approved task), removes it from the array, and persists to disk.
    public async deleteTask(projectId: string, taskId: string): Promise<DeleteTaskSuccessData> {
      await this.ensureInitialized();
      await this.reloadFromDisk();
    
      const proj = this.data.projects.find((p) => p.projectId === projectId);
      if (!proj) {
        throw new AppError(`Project ${projectId} not found`, AppErrorCode.ProjectNotFound);
      }
    
      if (proj.completed) {
        throw new AppError('Project is already completed', AppErrorCode.ProjectAlreadyCompleted);
      }
    
      const taskIndex = proj.tasks.findIndex((t) => t.id === taskId);
      if (taskIndex === -1) {
        throw new AppError(`Task ${taskId} not found`, AppErrorCode.TaskNotFound);
      }
    
      const task = proj.tasks[taskIndex];
      if (task.approved) {
        throw new AppError('Cannot delete an approved task', AppErrorCode.CannotModifyApprovedTask);
      }
    
      proj.tasks.splice(taskIndex, 1);
      await this.saveTasks();
    
      return {
        message: `Task ${taskId} deleted from project ${projectId}`,
      };
    }
  • Registration of the deleteTaskTool in the exported ALL_TOOLS array used for MCP tool listing.
    export const ALL_TOOLS: Tool[] = [
      listProjectsTool,
      readProjectTool,
      createProjectTool,
      deleteProjectTool,
      addTasksToProjectTool,
      finalizeProjectTool,
      generateProjectPlanTool,
    
      listTasksTool,
      readTaskTool,
      createTaskTool,
      updateTaskTool,
      deleteTaskTool,
      approveTaskTool,
      getNextTaskTool,
    ];
  • Registration of the deleteTaskToolExecutor in the toolExecutorMap used by executeToolAndHandleErrors.
    toolExecutorMap.set(deleteTaskToolExecutor.name, deleteTaskToolExecutor);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Remove' implies a destructive operation, but it doesn't clarify if deletion is permanent/reversible, what happens to dependent data, or if specific permissions are required. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence with zero wasted words. It's appropriately sized for a simple delete operation and front-loads the core action and target resource.

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

Completeness2/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 is insufficient. It doesn't address critical context like deletion consequences, error conditions, or return values. Given the complexity of a delete operation and lack of structured safety hints, more completeness is needed.

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%, with both parameters clearly documented in the schema. The description doesn't add any meaningful parameter semantics beyond what's already in the schema (e.g., format examples, validation rules). Baseline 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.

Purpose4/5

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

The description clearly states the action ('Remove') and target resource ('a task from a project'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this from sibling tools like 'delete_project' or 'update_task', which would require more specific language about scope or permanence.

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 like 'delete_project' or 'update_task', nor does it mention prerequisites (e.g., task must exist, user permissions). It simply states what the tool does without contextual usage information.

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

Related 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/chriscarrollsmith/taskqueue-mcp'

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