Skip to main content
Glama
TCSoftInc

TestCollab MCP Server

by TCSoftInc

delete_test_plan

Permanently delete a test plan and its execution data from TestCollab using the test plan ID. This action removes all related testing resources.

Instructions

Delete a test plan from TestCollab.

WARNING: This permanently deletes the test plan and related execution data.

Required: id (test plan ID) Optional: project_id

Input Schema

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

Implementation Reference

  • The handler function for deleting a test plan, which resolves the project ID, calls the API client, and formats the response.
    export async function handleDeleteTestPlan(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.deleteTestPlan(args.id, projectId);
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: true,
                deleted_test_plan_id: args.id,
                result,
              }),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                error: {
                  code: "DELETE_TEST_PLAN_FAILED",
                  message:
                    error instanceof Error ? error.message : "Unknown error",
                },
              }),
            },
          ],
        };
      }
    }
  • Zod schema for validating the input arguments for the delete_test_plan tool.
    export const deleteTestPlanSchema = z.object({
      id: z.number().describe("Test plan ID to delete (required)"),
      project_id: z
        .number()
        .optional()
        .describe("Project ID (optional if TC_DEFAULT_PROJECT is set)"),
    });
  • Tool definition containing name and description for the delete_test_plan tool.
    export const deleteTestPlanTool = {
      name: "delete_test_plan",
      description: `Delete a test plan from TestCollab.
    
    WARNING: This permanently deletes the test plan and related execution data.
    
    Required: id (test plan 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