create_manual_test_suite
Creates a manual test suite folder to organize test cases. Supports nesting under a parent suite for hierarchical structure.
Instructions
Create a new test suite folder to organize test cases. Use this to create a logical grouping for related test cases. Suites can be nested by providing a parentSuiteId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID (Required). The TestDino project identifier. | |
| name | Yes | Suite name (Required). A descriptive name for the test suite. | |
| description | No | Description of the test suite. | |
| parentSuiteId | No | Optional parent suite ID to create this suite as a child of another suite. If not provided, creates a root-level suite. |
Implementation Reference
- The handler function that executes the create_manual_test_suite tool logic. It validates args (projectId, name), builds a request body, calls the API endpoint via POST, and returns the response.
export async function handleCreateManualTestSuite( args?: CreateManualTestSuiteArgs ) { // Read PAT from environment variable (set in mcp.json) or from args const token = getApiKey(args); if (!token) { throw new Error( "Missing TESTDINO_PAT environment variable. " + "Please configure it in your .cursor/mcp.json file under the 'env' section." ); } // Validate required parameters if (!args?.projectId) { throw new Error("projectId is required"); } if (!args?.name) { throw new Error("name is required"); } try { const body: CreateManualTestSuiteBody = { projectId: String(args.projectId), name: String(args.name), }; // Add optional fields if (args?.description) { body.description = String(args.description); } if (args?.parentSuiteId) { body.parentSuiteId = String(args.parentSuiteId); } const createManualTestSuiteUrl = endpoints.createManualTestSuite( String(args.projectId) ); const response = await apiRequestJson<unknown>(createManualTestSuiteUrl, { method: "POST", headers: { Authorization: `Bearer ${token}`, }, body, }); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); throw new Error(`Failed to create manual test suite: ${errorMessage}`); } } - TypeScript interfaces (CreateManualTestSuiteArgs, CreateManualTestSuiteBody) and the tool definition object (createManualTestSuiteTool) with inputSchema defining projectId (required), name (required), description (optional), and parentSuiteId (optional).
interface CreateManualTestSuiteArgs { projectId: string; name: string; description?: string; parentSuiteId?: string; } interface CreateManualTestSuiteBody { projectId: string; name: string; description?: string; parentSuiteId?: string; } export const createManualTestSuiteTool = { name: "create_manual_test_suite", description: "Create a new test suite folder to organize test cases. Use this to create a logical grouping for related test cases. Suites can be nested by providing a parentSuiteId.", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "Project ID (Required). The TestDino project identifier.", }, name: { type: "string", description: "Suite name (Required). A descriptive name for the test suite.", }, description: { type: "string", description: "Description of the test suite.", }, parentSuiteId: { type: "string", description: "Optional parent suite ID to create this suite as a child of another suite. If not provided, creates a root-level suite.", }, }, required: ["projectId", "name"], }, }; - src/tools/index.ts:56-59 (registration)Re-exports the createManualTestSuiteTool and handleCreateManualTestSuite from the implementation file, making them available to the main server.
export { createManualTestSuiteTool, handleCreateManualTestSuite, } from "./manual-testsuites/create-manual-test-suite.js"; - src/index.ts:112-112 (registration)Tool is included in the tools array for MCP server capability registration.
createManualTestSuiteTool, - src/index.ts:267-271 (registration)The tool dispatch logic: when tool name is 'create_manual_test_suite', it calls handleCreateManualTestSuite with the parsed args.
if (name === "create_manual_test_suite") { return await handleCreateManualTestSuite( args as Parameters<typeof handleCreateManualTestSuite>[0] ); } - src/lib/endpoints.ts:253-260 (helper)URL builder helper: constructs the POST endpoint URL as `${baseUrl}/api/mcp/manual-tests/${projectId}/test-suites`.
/** * Create manual test suite * POST /api/mcp/manual-tests/:projectId/test-suites */ createManualTestSuite: (projectId: string): string => { const baseUrl = getBaseUrl(); return `${baseUrl}/api/mcp/manual-tests/${projectId}/test-suites`; },