Skip to main content
Glama

delete_test_case

Remove test cases from Xray test management system by specifying test case keys to maintain clean test repositories and eliminate obsolete test data.

Instructions

Delete a test case

Input Schema

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

Implementation Reference

  • Core handler function that implements the delete_test_case tool logic by fetching the test case details and executing a GraphQL deleteTest mutation.
    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); }
  • src/index.ts:111-124 (registration)
    Registration of the 'delete_test_case' tool in the MCP tools array, including name, description, and input schema.
    { 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'], }, },
  • Input schema definition for the delete_test_case tool, specifying the required 'testKey' parameter.
    inputSchema: { type: 'object', properties: { testKey: { type: 'string', description: 'The test case key to delete (e.g., "PROJ-123")', }, }, required: ['testKey'], },
  • MCP server dispatch handler case for 'delete_test_case' that calls the xrayClient method and returns success response.
    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