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`, }, ], }; }

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