Skip to main content
Glama

delete_test_run

Destructive

Permanently deletes a test run and all its execution results, attachments, and test-plan links; cannot be undone. Verifies the key first to prevent deletion of non-existent runs.

Instructions

Permanently delete a test run / test cycle together with ALL its execution results, its attachments and its test-plan links (DELETE /testrun/{key}). Cannot be undone. API v1 limitation: a test run is IMMUTABLE — there is no PUT /testrun, so it cannot be renamed, moved or have cases added/removed through the public API; its items are fixed at creation and the run status is derived from item statuses. Escape hatches: recreate_test_run_with_items (public, new key) or the internal-API tools update_test_run / add_test_cases_to_run / remove_test_cases_from_run (same key, require ZEPHYR_ALLOW_INTERNAL_API=true). So delete + create_test_run with the full desired items is the public way to change a run's name, folder or composition (the new run gets a NEW key). The DELETE itself answers 2xx for a key that never existed, was already deleted or belongs to another entity type (a TEST CASE key was reported deleted while the case stayed intact), so the key is verified FIRST with GET /testrun/{key}: an unknown key fails without deleting anything. Returns { deleted: true, key, existenceVerified: true }, or existenceVerified: false plus a note when that pre-check itself could not answer (the delete is still attempted, so success then does not prove the run existed).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testRunKeyYesTest run (cycle) key, e.g. PROJ-R123 (PROJ-C123 on older instances)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.5

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only carry destructiveHint=true; the description adds the irreversibility, the immutability of test runs (no PUT /testrun), the surprising 2xx-on-nonexistent-key DELETE semantics, and the GET pre-check that gates deletion. It even discloses the response shape and the caveat that success does not prove prior existence when the pre-check fails.

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?

Long but dense and front-loaded: destruction scope and irreversibility come first, then the immutability constraint, then escape hatches, then the verification caveat. Almost every sentence carries non-redundant operational detail, though the immutability/escape-hatch passage could be tightened.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by documenting the return object and the existenceVerified:false edge case. Combined with the verification behavior, key format, and alternative routes, an agent has everything needed to call this correctly and interpret the result.

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% and the single parameter already documents the key format with examples, so the schema does the heavy lifting. The description adds only the endpoint path reference (DELETE /testrun/{key}), which is context rather than parameter meaning. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

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

States a precise verb+resource ('Permanently delete a test run / test cycle') and immediately enumerates the full blast radius (execution results, attachments, test-plan links), plus the underlying endpoint. An agent can distinguish it from delete_test_case, delete_test_plan and recreate_test_run_with_items without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the alternatives (recreate_test_run_with_items, update_test_run, add_test_cases_to_run, remove_test_cases_from_run) and the conditions that select them, including the ZEPHYR_ALLOW_INTERNAL_API=true prerequisite. It also prescribes the intended public workflow ('delete + create_test_run with the full desired items') for the task the agent will actually want.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools