Skip to main content
Glama
TCSoftInc

TestCollab MCP Server

by TCSoftInc

create_suite

Create a new test suite in TestCollab to organize test cases hierarchically. Specify parent suite for nested structures and add descriptions for clarity.

Instructions

Create a new test suite in TestCollab. Tip: Call get_project_context first to see existing suites and resolve parent suite names to IDs.

Required: title Optional: project_id, parent (suite ID or title), description

Examples: Root suite: { "title": "Authentication" } Child suite: { "title": "Login", "parent": "Authentication" } With description: { "title": "API Tests", "description": "Tests for REST API endpoints" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject ID (optional if TC_DEFAULT_PROJECT is set)
titleYesSuite title (required)
descriptionNoSuite description
parentNoParent suite ID or title. Omit for a root-level suite.

Implementation Reference

  • The handler function that executes the logic to create a suite.
    export async function handleCreateSuite(args: {
      project_id?: number;
      title: string;
      description?: string;
      parent?: number | string;
    }): 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.",
                  },
                }),
              },
            ],
          };
        }
    
        // Resolve parent suite
        let parentId: number | null = null;
        if (args.parent !== undefined) {
          if (typeof args.parent === "number") {
            parentId = args.parent;
          } else {
            // Try to resolve by title
            const resolved = resolveSuiteByTitle(args.parent, projectId);
            if (resolved === null) {
              return {
                content: [
                  {
                    type: "text" as const,
                    text: JSON.stringify({
                      error: {
                        code: "PARENT_SUITE_NOT_FOUND",
                        message: `Could not find parent suite with title "${args.parent}". Call get_project_context to see available suites.`,
                      },
                    }),
                  },
                ],
              };
            }
            parentId = resolved;
          }
        }
    
        const client = getApiClient();
        const result = await client.createSuite({
          projectId,
          title: args.title,
          description: args.description,
          parentId,
        });
    
        // Invalidate project context cache so suite tree is fresh
        clearProjectContextCache();
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: true,
                suite: result,
              }),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                error: {
                  code: "CREATE_SUITE_FAILED",
                  message:
                    error instanceof Error ? error.message : "Unknown error",
                },
              }),
            },
          ],
        };
      }
    }
  • The zod schema defining input arguments for the create_suite tool.
    export const createSuiteSchema = z.object({
      project_id: z
        .number()
        .optional()
        .describe("Project ID (optional if TC_DEFAULT_PROJECT is set)"),
      title: z.string().min(1).describe("Suite title (required)"),
      description: z
        .string()
        .optional()
        .describe("Suite description"),
      parent: z
        .union([z.number(), z.string()])
        .optional()
        .describe(
          "Parent suite ID or title. Omit for a root-level suite."
        ),
    });
  • The definition and registration object for the create_suite tool.
    export const createSuiteTool = {
      name: "create_suite",
      description: `Create a new test suite in TestCollab.
    Tip: Call get_project_context first to see existing suites and resolve parent suite names to IDs.
    
    Required: title
    Optional: project_id, parent (suite ID or title), description
    
    Examples:
      Root suite: { "title": "Authentication" }
      Child suite: { "title": "Login", "parent": "Authentication" }
      With description: { "title": "API Tests", "description": "Tests for REST API endpoints" }`,
    };
  • A helper function to resolve a parent suite ID by its title.
    function resolveSuiteByTitle(
      title: string,
      projectId: number
    ): number | null {
      const context = getCachedProjectContext(projectId);
      if (!context) return null;
    
      const search = (
        nodes: Array<{ id: number; title: string; children: unknown[] }>
      ): number | null => {
        for (const node of nodes) {
          if (node.title.toLowerCase() === title.toLowerCase()) {
            return node.id;
          }
          const childResult = search(
            node.children as Array<{ id: number; title: string; children: unknown[] }>
          );
          if (childResult !== null) return childResult;
        }
        return null;
      };
    
      return search(context.suites as Array<{ id: number; title: string; children: unknown[] }>);
    }
Behavior3/5

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

No annotations provided, so description carries full burden. Explains the parent resolution workflow (ID or title) and implies this is a write operation creating new resources. However, lacks details on return values, idempotency, error conditions (e.g., duplicate titles), or permissions required.

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?

Excellent structure: one-line purpose → prerequisite tip → parameter summary → labeled examples. Every sentence earns its place. Front-loaded with critical action, no filler text, and examples are formatted for immediate utility.

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

Completeness3/5

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

Input parameters are fully documented (100% schema coverage + examples). However, no output schema exists and the description fails to specify what the tool returns (e.g., created suite ID, full object, success boolean), which is necessary information for agent workflow integration.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing baseline 3. Description adds value through concrete JSON examples showing root vs child suite patterns and the polymorphic parent parameter usage. The explicit 'Required/Optional' list reinforces schema constraints, though somewhat redundant.

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?

Opens with specific verb 'Create' + resource 'test suite' + system 'TestCollab'. Clearly distinguishes from sibling tools like update_suite, delete_suite, and create_test_case through the specific resource naming.

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?

Provides explicit prerequisite guidance: 'Call get_project_context first to see existing suites and resolve parent suite names to IDs.' This establishes clear workflow sequencing with a sibling tool, though it doesn't explicitly state when NOT to use the tool (e.g., vs update_suite).

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

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