Delete a test case
case.deleteChanges dataCreates, updates or deletes something in your workspace.What it does
Permanently deletes one test case. This cannot be undone. Use it to clean up duplicates or drafts nobody wants. It is refused when the case has history: if it was ever part of a test run ("Test case is already used in test run") or is filed under a feature or suite ("Deletion failed. Test case is already in use."). To retire a case that has history, archive it instead with case.update and status INACTIVE (resend its steps). Takes the internal id from case.list. Returns { success, message }. For many ids at once use case.delete_batch.
Ask your agent
You don’t call case.delete yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:
- “Delete that duplicate login test you just made”
- “Remove the test case for the old coupon page”
- “Get rid of GenTC-0031, it was a mistake”
Inputs
| Name | Type | Description |
|---|---|---|
caseIdrequired | string | Internal test case id: the id from case.list (e.g. "AAtc-kzqd-mwpe-rtya-hbnc-xufo-lgsi"), not the human caseId like "GenTC-0001". |
The MCP call
What the agent’s MCP client sends (placeholders in angle brackets):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "case.delete",
"arguments": {
"caseId": "<caseId>"
}
}
}Connect your agent
npx -y @testmaze/mcp init tmt_xxx claude mcp add tm --scope project -- npx -y @testmaze/mcp
Create the token in your Test Maze workspace under Settings → MCP. Setup for Cursor, Cline, Gemini CLI and Codex CLI is shown there too.
More test cases tools
- List test cases
case.list - Get one test case
testcase.get - Create a test case
case.create - Update a test case
case.update - Create several test cases at once
case.create_batch - Waive an acceptance criterion
case.waive_ac - Delete several test cases
case.delete_batch - Remove a waiver
case.unwaive_ac