Skip to main content
Glama
debugg-ai

Debugg AI MCP

Official
by debugg-ai

Delete Test Case

delete_test_case

Disable a test case by UUID, hiding it from default queries without permanent removal.

Instructions

Disable (soft-delete) a test case. The test is hidden from default list queries but not permanently removed. Requires testUuid. Returns {deleted: true, testUuid}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testUuidYesUUID of the test case to delete. Required.

Implementation Reference

  • The actual handler function that executes the 'delete_test_case' tool logic. It calls client.disableTestCase(input.testUuid) to soft-delete a test case and returns {deleted: true, testUuid}.
    export async function deleteTestCaseHandler(
      input: DeleteTestCaseInput,
      _context: ToolContext,
    ): Promise<ToolResponse> {
      const start = Date.now();
      logger.toolStart('delete_test_case', input);
      try {
        const client = new DebuggAIServerClient(config.api.key);
        await client.init();
    
        await client.disableTestCase(input.testUuid);
        logger.toolComplete('delete_test_case', Date.now() - start);
        return { content: [{ type: 'text', text: JSON.stringify({ deleted: true, testUuid: input.testUuid }, null, 2) }] };
      } catch (error) {
        logger.toolError('delete_test_case', error as Error, Date.now() - start);
        throw handleExternalServiceError(error, 'DebuggAI', 'delete_test_case');
      }
    }
  • Builds the 'delete_test_case' Tool object including its inputSchema (requires testUuid string). This defines the schema used for the unvalidated tool registration.
    export function buildDeleteTestCaseTool(): Tool {
      return {
        name: 'delete_test_case',
        title: 'Delete Test Case',
        description: 'Disable (soft-delete) a test case. The test is hidden from default list queries but not permanently removed. Requires testUuid. Returns {deleted: true, testUuid}.',
        inputSchema: {
          type: 'object',
          properties: {
            testUuid: { type: 'string', description: 'UUID of the test case to delete. Required.' },
          },
          required: ['testUuid'],
          additionalProperties: false,
        },
      };
    }
  • Zod schema ('DeleteTestCaseInputSchema') and TypeScript type ('DeleteTestCaseInput') for the delete_test_case input. Validates that testUuid is a valid UUID string.
    export const DeleteTestCaseInputSchema = z.object({
      testUuid: z.string().uuid(),
    }).strict();
    
    export type DeleteTestCaseInput = z.infer<typeof DeleteTestCaseInputSchema>;
  • Builds the validated version of the tool by combining the base tool definition, the Zod input schema, and the handler function, which gets registered in the tool registry.
    export function buildValidatedDeleteTestCaseTool(): ValidatedTool {
      return { ...buildDeleteTestCaseTool(), inputSchema: DeleteTestCaseInputSchema, handler: deleteTestCaseHandler };
    }
  • The DebuggAIServerClient.disableTestCase() helper method that makes the API POST call to api/v1/e2e-tests/{testUuid}/disable/ to soft-delete the test case.
    public async disableTestCase(testUuid: string): Promise<{ uuid: string; isDisabled: boolean }> {
      if (!this.tx) throw new Error('Client not initialized — call init() first');
      await this.tx.post<any>(`api/v1/e2e-tests/${testUuid}/disable/`, {});
      return { uuid: testUuid, isDisabled: true };
    }
Behavior4/5

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

With no annotations, the description fully discloses that the operation is a soft-delete (not permanent) and specifies the return object. Could add more on permissions or side effects, but current transparency is adequate for the tool's simplicity.

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?

Two sentences, each serving a purpose: one explaining the operation and behavior, another linking parameter to output. No unnecessary words, highly efficient.

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?

For a simple 1-parameter tool with no output schema, the description fully covers purpose, behavior, parameter, and return. No gaps given the tool's complexity.

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?

Only one parameter (testUuid) with full schema coverage. The description adds minimal meaning beyond the schema, simply restating that it is required and appears in the return. 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?

Clearly states it performs a soft-delete (disable), explains what that means, and lists required parameter and return output. Distinguishes from sibling deletion tools by specifying 'soft-delete' and the exact effect.

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

Usage Guidelines3/5

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

Does not explicitly state when to use this tool versus other delete tools (e.g., delete_test_suite) or when soft-delete is appropriate. Implies usage from purpose, but lacks contextual guidance.

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/debugg-ai/debugg-ai-mcp'

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