Skip to main content
Glama

delete_test_case

Remove a test case from Xray test management by specifying its unique key to maintain organized test repositories and eliminate outdated test data.

Instructions

Delete a test case

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testKeyYesThe test case key to delete (e.g., "PROJ-123")

Implementation Reference

  • The core handler function that implements the delete_test_case tool logic. It retrieves the test case by key to obtain the internal issueId, then executes a GraphQL deleteTest mutation via the graphqlRequest method.
    async deleteTestCase(testKey: string): Promise<void> {
      // First, get the issueId from the test key
      const test = await this.getTestCase(testKey);
    
      const mutation = `
        mutation DeleteTest($issueId: String!) {
          deleteTest(issueId: $issueId)
        }
      `;
    
      const variables = {
        issueId: test.issueId
      };
    
      await this.graphqlRequest<{ deleteTest: string }>(mutation, variables);
    }
  • The input schema and tool metadata definition for 'delete_test_case', specifying the required 'testKey' string parameter.
    {
      name: 'delete_test_case',
      description: 'Delete a test case',
      inputSchema: {
        type: 'object',
        properties: {
          testKey: {
            type: 'string',
            description: 'The test case key to delete (e.g., "PROJ-123")',
          },
        },
        required: ['testKey'],
      },
    },
  • src/index.ts:584-594 (registration)
    The registration and dispatch handler in the MCP tool call switch statement, which invokes the xrayClient.deleteTestCase method with the provided testKey argument and returns a success message.
    case 'delete_test_case': {
      await xrayClient.deleteTestCase(args.testKey as string);
      return {
        content: [
          {
            type: 'text',
            text: `Test case ${args.testKey} deleted successfully`,
          },
        ],
      };
    }
Behavior2/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 states the action ('Delete') but doesn't clarify if this is permanent, requires specific permissions, affects related data (e.g., test executions), or has side effects like audit logging. For a destructive operation with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is extremely concise—a single, direct sentence with no wasted words. It front-loads the core action ('Delete') and resource, making it immediately scannable and efficient. Every word earns its place by conveying essential information without redundancy.

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 tool's destructive nature, lack of annotations, and absence of an output schema, the description is incomplete. It doesn't address critical aspects like success/failure responses, error conditions, or the impact of deletion on the system. For a mutation tool with no structured safety hints, more context is needed to guide safe usage.

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?

The schema description coverage is 100%, with the single parameter 'testKey' fully documented in the schema (including an example). The description adds no additional parameter information beyond what the schema provides, such as format constraints or validation rules. This meets the baseline for high schema coverage but doesn't enhance understanding.

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 verb ('Delete') and resource ('a test case'), making the purpose immediately understandable. It distinguishes itself from sibling tools like 'update_test_case' or 'get_test_case' by specifying the destructive action. However, it doesn't mention the specific system or context (e.g., Jira, test management platform), which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing test case), consequences (e.g., irreversible deletion), or when to choose other tools like 'update_test_case' for modifications instead. This leaves the agent with minimal contextual direction.

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

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/c4m3lblue-star/xray-mcp'

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