Search Test Suites
search_test_suitesSearch and list test suites for a project, with paginated results showing suite status, test counts, pass rates, and last run timestamps. Specify a project UUID or name, optionally filter by text.
Instructions
List and search test suites for a project. Returns paginated results with suite status, test counts, pass rates, and last run timestamps. Requires a project identifier (projectUuid or projectName). Optional: search text filter, page, pageSize (1-100, default 20).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectUuid | No | Project UUID. Provide projectUuid OR projectName. | |
| projectName | No | Project name (case-insensitive exact match). Provide projectUuid OR projectName. | |
| search | No | Optional text filter applied to suite name and description. | |
| page | No | Page number (default 1). | |
| pageSize | No | Results per page (default 20, max 100). |
Implementation Reference
- Main handler function that executes the search_test_suites tool logic. It creates a DebuggAIServerClient, resolves projectUuid (via projectName if needed), calls client.listTestSuites() with search/pagination params, and returns the JSON result.
export async function searchTestSuitesHandler( input: SearchTestSuitesInput, _context: ToolContext, ): Promise<ToolResponse> { const start = Date.now(); logger.toolStart('search_test_suites', input); try { const client = new DebuggAIServerClient(config.api.key); await client.init(); let projectUuid = input.projectUuid; if (!projectUuid) { const resolved = await resolveProject(client, input.projectName!); if ('error' in resolved) return errorResp(resolved.error, resolved.message, { candidates: (resolved as any).candidates }); projectUuid = resolved.uuid; } const result = await client.listTestSuites({ projectUuid, search: input.search, page: input.page, pageSize: input.pageSize, }); logger.toolComplete('search_test_suites', Date.now() - start); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { logger.toolError('search_test_suites', error as Error, Date.now() - start); throw handleExternalServiceError(error, 'DebuggAI', 'search_test_suites'); } } - types/index.ts:367-374 (schema)Zod schema and TypeScript type for the search_test_suites input (projectIdentifier, optional search, page, pageSize).
export const SearchTestSuitesInputSchema = z.object({ ...projectIdentifier, search: z.string().optional(), page: z.number().int().min(1).optional(), pageSize: z.number().int().min(1).max(100).optional(), }).strict(); export type SearchTestSuitesInput = z.infer<typeof SearchTestSuitesInputSchema>; - tools/testSuiteTools.ts:58-74 (registration)Builds the Tool object with name 'search_test_suites', title, description, and inputSchema (with PROJECT_PROPS, search, page, pageSize).
export function buildSearchTestSuitesTool(): Tool { return { name: 'search_test_suites', title: 'Search Test Suites', description: 'List and search test suites for a project. Returns paginated results with suite status, test counts, pass rates, and last run timestamps. Requires a project identifier (projectUuid or projectName). Optional: search text filter, page, pageSize (1-100, default 20).', inputSchema: { type: 'object', properties: { ...PROJECT_PROPS, search: { type: 'string', description: 'Optional text filter applied to suite name and description.' }, page: { type: 'number', description: 'Page number (default 1).', minimum: 1 }, pageSize: { type: 'number', description: 'Results per page (default 20, max 100).', minimum: 1, maximum: 100 }, }, additionalProperties: false, }, }; } - tools/testSuiteTools.ts:76-78 (registration)Builds the ValidatedTool combining the Tool definition with the Zod schema and the handler function.
export function buildValidatedSearchTestSuitesTool(): ValidatedTool { return { ...buildSearchTestSuitesTool(), inputSchema: SearchTestSuitesInputSchema, handler: searchTestSuitesHandler }; } - tools/index.ts:49-49 (registration)Registration of search_test_suites tool in the main tools array (initTools function).
buildSearchTestSuitesTool(),