delete_task
Remove a task from the Task MCP Server by specifying its ID to maintain an organized task list.
Instructions
Delete a task
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | ID of the task to delete |
Implementation Reference
- src/task_mcp_server/server.py:142-159 (handler)The handler implementation for the `delete_task` tool, which removes a task from the in-memory tasks dictionary.
elif name == "delete_task": task_id = int(arguments.get("task_id", 0)) if task_id not in tasks: return [ types.TextContent( type="text", text=f"❌ Task {task_id} not found" ) ] deleted_task = tasks.pop(task_id) return [ types.TextContent( type="text", text=f"🗑️ Task deleted: {deleted_task['title']}" ) ] - src/task_mcp_server/server.py:59-71 (schema)The schema registration for the `delete_task` tool, defining the required `task_id` argument.
name="delete_task", description="Delete a task", inputSchema={ "type": "object", "properties": { "task_id": { "type": "number", "description": "ID of the task to delete" } }, "required": ["task_id"] } )