Skip to main content
Glama
TCSoftInc

TestCollab MCP Server

by TCSoftInc

delete_suite

Remove a test suite from TestCollab to manage testing resources. This action deletes the suite and may affect related child suites and test cases.

Instructions

Delete a test suite from TestCollab.

WARNING: This will delete the suite and may affect child suites and test cases. Use with caution.

Required: id (suite ID) Optional: project_id

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSuite ID to delete (required)
project_idNoProject ID (optional if TC_DEFAULT_PROJECT is set)

Implementation Reference

  • The handle function for the delete_suite tool which uses the API client to perform the deletion and clears the project cache.
    export async function handleDeleteSuite(args: {
      id: number;
      project_id?: number;
    }): Promise<{ content: Array<{ type: "text"; text: string }> }> {
      try {
        const projectId = resolveProjectId(args.project_id);
        if (!projectId) {
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify({
                  error: {
                    code: "MISSING_PROJECT_ID",
                    message:
                      "No project_id provided and no default project configured. Set TC_DEFAULT_PROJECT or pass project_id.",
                  },
                }),
              },
            ],
          };
        }
    
        const client = getApiClient();
        const result = await client.deleteSuite(args.id, projectId);
    
        // Invalidate project context cache
        clearProjectContextCache();
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: true,
                deleted_suite_id: args.id,
                result,
              }),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                error: {
                  code: "DELETE_SUITE_FAILED",
                  message:
                    error instanceof Error ? error.message : "Unknown error",
                },
              }),
            },
          ],
        };
      }
    }
  • Input validation schema for the delete_suite tool.
    export const deleteSuiteSchema = z.object({
      id: z.number().describe("Suite ID to delete (required)"),
      project_id: z
        .number()
        .optional()
        .describe("Project ID (optional if TC_DEFAULT_PROJECT is set)"),
    });
  • Tool definition for delete_suite with its name and description.
    export const deleteSuiteTool = {
      name: "delete_suite",
      description: `Delete a test suite from TestCollab.
    
    WARNING: This will delete the suite and may affect child suites and test cases. Use with caution.
    
    Required: id (suite ID)
    Optional: project_id`,
    };

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/TCSoftInc/testcollab-mcp-server'

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