Skip to main content
Glama
kazuph

@kazuph/mcp-taskmanager

by kazuph

delete_task

Remove an uncompleted task from a specified request in a task management system using a queue-based protocol. Displays updated progress table after deletion.

Instructions

Delete a specific task from a request. Only uncompleted tasks can be deleted.

A progress table will be displayed showing the remaining tasks after deletion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
taskIdYes

Implementation Reference

  • Core handler method in TaskManagerServer that implements the deletion logic: loads data, finds and removes the uncompleted task from the request's tasks array, saves to file, generates progress table, and returns result.
    public async deleteTask(requestId: string, taskId: string) {
      await this.loadTasks();
      const req = this.data.requests.find((r) => r.requestId === requestId);
      if (!req) return { status: "error", message: "Request not found" };
    
      const taskIndex = req.tasks.findIndex((t) => t.id === taskId);
      if (taskIndex === -1) return { status: "error", message: "Task not found" };
      if (req.tasks[taskIndex].done)
        return { status: "error", message: "Cannot delete completed task" };
    
      req.tasks.splice(taskIndex, 1);
      await this.saveTasks();
    
      const progressTable = this.formatTaskProgressTable(requestId);
      return {
        status: "task_deleted",
        message: `Task ${taskId} has been deleted.\n${progressTable}`,
      };
    }
  • MCP tool dispatcher case for 'delete_task': parses input with schema, calls TaskManagerServer.deleteTask, and returns JSON stringified result as text content.
    case "delete_task": {
      const parsed = DeleteTaskSchema.safeParse(args);
      if (!parsed.success) {
        throw new Error(`Invalid arguments: ${parsed.error}`);
      }
      const { requestId, taskId } = parsed.data;
      const result = await taskManagerServer.deleteTask(requestId, taskId);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Zod schema used for input validation of delete_task tool arguments (requestId and taskId).
    const DeleteTaskSchema = z.object({
      requestId: z.string(),
      taskId: z.string(),
    });
  • index.ts:267-280 (registration)
    Tool object definition for 'delete_task', including name, description, and input schema; returned in listTools.
    const DELETE_TASK_TOOL: Tool = {
      name: "delete_task",
      description:
        "Delete a specific task from a request. Only uncompleted tasks can be deleted.\n\n" +
        "A progress table will be displayed showing the remaining tasks after deletion.",
      inputSchema: {
        type: "object",
        properties: {
          requestId: { type: "string" },
          taskId: { type: "string" },
        },
        required: ["requestId", "taskId"],
      },
    };
  • index.ts:683-696 (registration)
    Registration of all tools including DELETE_TASK_TOOL in the ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        REQUEST_PLANNING_TOOL,
        GET_NEXT_TASK_TOOL,
        MARK_TASK_DONE_TOOL,
        APPROVE_TASK_COMPLETION_TOOL,
        APPROVE_REQUEST_COMPLETION_TOOL,
        OPEN_TASK_DETAILS_TOOL,
        LIST_REQUESTS_TOOL,
        ADD_TASKS_TO_REQUEST_TOOL,
        UPDATE_TASK_TOOL,
        DELETE_TASK_TOOL,
      ],
    }));
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes key behavioral traits: the deletion action (implying mutation), the constraint that only uncompleted tasks can be deleted, and that a progress table will be displayed after deletion. However, it lacks details on permissions, error handling, or what happens if deletion fails, leaving gaps for a mutation tool.

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

Conciseness4/5

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

The description is appropriately concise with two sentences that cover key points: the action with constraints and the post-deletion behavior. It's front-loaded with the main purpose, and each sentence adds value without redundancy. However, the second sentence could be more integrated with the first for better flow.

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?

Given the complexity of a deletion tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It misses critical details: parameter meanings, error cases, permissions, and the format of the progress table. While it covers the basic action and constraint, it doesn't provide enough context for reliable agent use in this environment.

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 input schema has 0% description coverage, so the description must compensate for undocumented parameters. It mentions 'a specific task from a request,' which hints at the need for requestId and taskId, but doesn't explain their semantics, formats, or sources. For example, it doesn't clarify if these are IDs from 'list_requests' or 'get_next_task.' The description adds minimal value beyond the schema's structure.

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 ('Delete') and resource ('a specific task from a request'), making the purpose understandable. It distinguishes from siblings like 'update_task' or 'mark_task_done' by specifying deletion, though it doesn't explicitly contrast with all alternatives. The description avoids tautology by adding operational details beyond just restating the name.

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 provides some usage context by stating 'Only uncompleted tasks can be deleted,' which implies when to use it (for uncompleted tasks) and when not to use it (for completed tasks). However, it doesn't explicitly name alternatives like 'update_task' for modifying tasks or clarify prerequisites such as needing valid request/task IDs. The guidance is implied rather than comprehensive.

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/kazuph/mcp-taskmanager'

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