Delete a Task via MCP: Irreversible Actions and Confirmation Prompts
Developer reference for the delete_task MCP tool. Learn about this irreversible operation, understand when to use it, and implement strong confirmation patterns to prevent accidental deletions. Includes example tool calls, natural language prompts, edge cases, and troubleshooting.
Tool Overview
Purpose
The delete_task tool permanently removes a task from your Corcava workspace. This action cannot be undone.
⚠️⚠️ Destructive operation: This tool permanently deletes data. Always use strong confirmation patterns and preview the task before deletion.
⚠️ Warning
Task deletion is permanent. Deleted tasks cannot be recovered. Always verify you're deleting the correct task and require explicit confirmation (e.g., "DELETE CONFIRM" with both words).
Input Parameters
The tool requires only the task ID to delete.
Output Format
On successful deletion, the tool returns a confirmation:
{
"success": true,
"message": "Task deleted successfully",
"deleted_task_id": 123
}
Safety Patterns: Strong Confirmation Required
⚠️ Always Use Strong Confirmation
Deletion is irreversible. Use these mandatory patterns:
- Preview First: Always call
get_taskto show task details - Explicit Warning: Warn user that deletion is permanent
- Strong Token: Require "DELETE CONFIRM" (both words) not just "CONFIRM"
- Task Verification: Show task title and ID before deletion
Learn more about safe write workflows →
Safe Prompt Pattern
✅ Safe Prompt Template:
"I want to delete the [task name] task.
Rules:
1. First, call get_task to show me the task details
2. Warn me that deletion is permanent and cannot be undone
3. Wait for me to type DELETE CONFIRM (both words) before calling delete_task
4. If I don't type DELETE CONFIRM, don't delete anything"
Example Tool Calls
Example: Delete Task
Tool Call (JSON):
{
"tool": "delete_task",
"arguments": {
"task_id": 123
}
}
Returns: Confirmation that task was deleted
⚠️ Warning: This permanently deletes the task. Always confirm first!
Natural Language Prompt Examples
Safe Deletion with Strong Confirmation
User Prompt:
"Delete the duplicate 'Test login' task. Show me the task first, warn me it's permanent, then wait for DELETE CONFIRM."
AI Behavior:
- AI calls
get_taskto show task details - AI displays: "Task #123: Test login (duplicate)"
- AI warns: "⚠️ This will permanently delete this task. This cannot be undone."
- AI asks: "Type DELETE CONFIRM (both words) to delete this task"
- User types "DELETE CONFIRM"
- AI calls
delete_taskonly after exact confirmation - AI confirms task was deleted
What NOT to Do
❌ Unsafe Prompt:
"Delete task 123"
Why it's unsafe:
- No preview of what will be deleted
- No warning about permanence
- Weak confirmation (or none)
- High risk of accidental deletion
When to Use Delete
Task deletion should be rare. Consider these alternatives first:
✅ Alternatives to Deletion:
- Mark as Done: Use
update_taskto set status="done" - Archive: Move to an "Archive" board or project
- Close: Update status and add a closing comment
- Cancel: Update status to "blocked" with explanation
⚠️ When Deletion is Appropriate:
- True Duplicates: Removing exact duplicate tasks
- Test Tasks: Cleaning up test/experimental tasks
- Mistakes: Tasks created by accident
- Data Cleanup: Removing obsolete or invalid tasks
Common Use Cases
- Backlog Grooming - Remove stale or obsolete tasks from backlog
- Duplicate Detection - Remove duplicate tasks after merging
- Task Management - Clean up tasks as part of task management workflow
Edge Cases
Task Not Found (404)
Situation: task_id doesn't exist or was already deleted
Response:
{
"error": "not_found",
"message": "Task with ID 123 not found"
}
Handling: Verify task ID is correct, or task may have already been deleted
Permission Denied (403)
Situation: Task exists but you don't have permission to delete it
Response:
{
"error": "forbidden",
"message": "You don't have permission to delete this task"
}
Handling: Check task permissions in Corcava
Read 403 troubleshooting guide →
Task Has Dependencies
Situation: Task may be linked to other tasks or have time tracking
Response: Task is deleted, but linked data may be affected (check Corcava documentation for details)
Handling: Review task relationships before deletion if important
Troubleshooting
Task Not Found (404)
Symptom: 404 Not Found error when trying to delete
Causes:
- Task ID doesn't exist
- Task was already deleted
- Invalid task_id format
Fix:
- Verify task_id is correct
- Use
list_tasksorget_taskto find valid IDs - Check if task still exists
Permission Denied (403)
Symptom: 403 Forbidden error
Causes:
- Task belongs to different workspace
- You don't have delete permissions
- Task is protected or locked
Fix:
- Verify you're in the correct workspace
- Check task permissions in Corcava
- Contact workspace admin if needed
Read 403 troubleshooting guide →
Best Practices
Using delete_task Safely
- ✅ Always call
get_taskfirst to preview what will be deleted - ✅ Show task title and ID to user before deletion
- ✅ Warn user that deletion is permanent and cannot be undone
- ✅ Require strong confirmation token: "DELETE CONFIRM" (both words)
- ✅ Consider alternatives (marking done, archiving) before deleting
- ✅ Only delete true duplicates, test tasks, or mistakes
- ✅ Verify task_id is correct before deletion
- ✅ Never batch delete without showing full list and requiring "DELETE CONFIRM ALL"
Related Tools
Often used together with:
- get_task - Preview task details before deletion (required)
- list_tasks - Find tasks to delete (e.g., duplicates)
- update_task - Consider updating status instead of deleting
- Least-Privilege Workflows - Safe write workflow patterns