Skip to main content
Glama
debugg-ai

Debugg AI MCP

Official
by debugg-ai

Update Test Case

update_test_case

Update a test case's name, description, or agent task description by providing its UUID. Returns the updated test case.

Instructions

Update a test case's name, description, or agentTaskDescription. Requires testUuid. At least one of name, description, or agentTaskDescription must be provided. Returns the updated test case.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testUuidYesUUID of the test case to update. Required.
nameNoNew name for the test case.
descriptionNoNew description.
agentTaskDescriptionNoNew agent task description.

Implementation Reference

  • The main handler function for update_test_case. Takes UpdateTestCaseInput, calls client.updateTestCase() with testUuid, name, description, and agentTaskDescription, then returns the updated test case as JSON.
    export async function updateTestCaseHandler(
      input: UpdateTestCaseInput,
      _context: ToolContext,
    ): Promise<ToolResponse> {
      const start = Date.now();
      logger.toolStart('update_test_case', input);
      try {
        const client = new DebuggAIServerClient(config.api.key);
        await client.init();
    
        const updated = await client.updateTestCase(input.testUuid, {
          name: input.name,
          description: input.description,
          agentTaskDescription: input.agentTaskDescription,
        });
    
        logger.toolComplete('update_test_case', Date.now() - start);
        return { content: [{ type: 'text', text: JSON.stringify(updated, null, 2) }] };
      } catch (error) {
        logger.toolError('update_test_case', error as Error, Date.now() - start);
        throw handleExternalServiceError(error, 'DebuggAI', 'update_test_case');
      }
    }
  • Zod schema (UpdateTestCaseInputSchema) and TypeScript type (UpdateTestCaseInput) for the tool's input validation.
    export const UpdateTestCaseInputSchema = z.object({
      testUuid: z.string().uuid(),
      name: z.string().min(1).optional(),
      description: z.string().min(1).optional(),
      agentTaskDescription: z.string().min(1).optional(),
    }).strict();
    
    export type UpdateTestCaseInput = z.infer<typeof UpdateTestCaseInputSchema>;
  • tools/index.ts:52-55 (registration)
    Tool registration: buildUpdateTestCaseTool() is called and added to the tools array at line 52 (and validated variant at line 74) during initTools().
    buildUpdateTestCaseTool(),
    buildDeleteTestCaseTool(),
    buildRunTestSuiteTool(),
    buildGetTestSuiteResultsTool(),
  • Tool definition builder: buildUpdateTestCaseTool() defines the tool name ('update_test_case'), title, description, and inputSchema. buildValidatedUpdateTestCaseTool() pairs it with the Zod schema and handler at line 151-153.
    export function buildUpdateTestCaseTool(): Tool {
      return {
        name: 'update_test_case',
        title: 'Update Test Case',
        description: 'Update a test case\'s name, description, or agentTaskDescription. Requires testUuid. At least one of name, description, or agentTaskDescription must be provided. Returns the updated test case.',
        inputSchema: {
          type: 'object',
          properties: {
            testUuid: { type: 'string', description: 'UUID of the test case to update. Required.' },
            name: { type: 'string', description: 'New name for the test case.', minLength: 1 },
            description: { type: 'string', description: 'New description.', minLength: 1 },
            agentTaskDescription: { type: 'string', description: 'New agent task description.', minLength: 1 },
          },
          required: ['testUuid'],
          additionalProperties: false,
        },
      };
    }
  • The service-layer helper: DebuggAIServerClient.updateTestCase() makes a PATCH request to api/v1/e2e-tests/{testUuid}/ to update the test case on the backend.
    public async updateTestCase(
      testUuid: string,
      patch: { name?: string; description?: string; agentTaskDescription?: string },
    ): Promise<{ uuid: string; name: string; description: string; agentTaskDescription: string }> {
      if (!this.tx) throw new Error('Client not initialized — call init() first');
      const body: Record<string, any> = {};
      if (patch.name !== undefined) body.name = patch.name;
      if (patch.description !== undefined) body.description = patch.description;
      if (patch.agentTaskDescription !== undefined) body.agent_task_description = patch.agentTaskDescription;
      const t = await this.tx.patch<any>(`api/v1/e2e-tests/${testUuid}/`, body);
      return {
        uuid: t.uuid,
        name: t.name,
        description: t.description,
        agentTaskDescription: t.agentTaskDescription ?? t.agent_task_description ?? '',
      };
    }
Behavior3/5

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

No annotations are provided, so the description must cover behavioral traits. It mentions the tool returns the updated test case, which is helpful, but it does not disclose error handling, idempotency, or potential side effects. Adequate but not comprehensive.

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 with no redundant information. Every word adds value, making it easy to parse quickly.

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

Completeness4/5

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

For an update tool with no output schema and moderate complexity, the description covers what it does, required fields, a usage condition, and return value. It is complete enough for an agent to invoke correctly, though additional details about error behavior would be beneficial.

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 input schema already describes all parameters with 100% coverage. The description adds the constraint that at least one of name, description, or agentTaskDescription must be provided, which is a beneficial clarification beyond the schema's 'required' list.

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?

The description clearly states the tool updates a test case and specifies exactly which fields can be updated: name, description, or agentTaskDescription. This distinguishes it from siblings like create_test_case or delete_test_case.

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

Usage Guidelines4/5

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

The description provides direct guidance: requires testUuid and at least one of the optional fields must be provided. It does not explicitly state when not to use or alternatives, but the context is clear enough.

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