list_manual_test_suites
List test suites hierarchically to find suite IDs for test case creation. Navigate structure and understand test organization.
Instructions
List the test suite hierarchy to help users find suiteIds for test case creation. Use this to navigate the test suite structure and understand test organization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID (Required). The TestDino project identifier. | |
| parentSuiteId | No | Optional parent suite ID to fetch only children of a specific suite. If not provided, returns the root-level suites. |
Implementation Reference
- The handler function that executes the 'list_manual_test_suites' tool logic. Validates token and projectId, builds the API URL via endpoints.listManualTestSuites(), makes an authenticated GET request, and returns the response as text content.
export async function handleListManualTestSuites( args?: ListManualTestSuitesArgs ) { // 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 parameter if (!args?.projectId) { throw new Error("projectId is required"); } try { const params: ListManualTestSuitesParams = { projectId: String(args.projectId), }; // Add optional parent suite filter if (args?.parentSuiteId) { params.parentSuiteId = String(args.parentSuiteId); } const listManualTestSuitesUrl = endpoints.listManualTestSuites(params); const response = await apiRequestJson<unknown>(listManualTestSuitesUrl, { headers: { Authorization: `Bearer ${token}`, }, }); 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 list manual test suites: ${errorMessage}`); } } - Type interfaces ListManualTestSuitesArgs and ListManualTestSuitesParams defining the input schema (projectId required, parentSuiteId optional).
interface ListManualTestSuitesArgs { projectId: string; parentSuiteId?: string; } interface ListManualTestSuitesParams { projectId: string; parentSuiteId?: string; } - Tool definition object (listManualTestSuitesTool) containing name 'list_manual_test_suites', description, and JSON input schema (projectId string required, parentSuiteId string optional).
export const listManualTestSuitesTool = { name: "list_manual_test_suites", description: "List the test suite hierarchy to help users find suiteIds for test case creation. Use this to navigate the test suite structure and understand test organization.", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "Project ID (Required). The TestDino project identifier.", }, parentSuiteId: { type: "string", description: "Optional parent suite ID to fetch only children of a specific suite. If not provided, returns the root-level suites.", }, }, required: ["projectId"], }, - src/index.ts:261-265 (registration)Registration of the tool handler in the main server's callTool handler: routes the name 'list_manual_test_suites' to handleListManualTestSuites.
if (name === "list_manual_test_suites") { return await handleListManualTestSuites( args as Parameters<typeof handleListManualTestSuites>[0] ); } - src/index.ts:111-112 (registration)Tool registration: listManualTestSuitesTool is included in the tools array passed to the server.
listManualTestSuitesTool, createManualTestSuiteTool,