list_ci_test_results
Retrieve test results from App Store Connect CI/CD builds to analyze performance, identify failures, and monitor testing outcomes for iOS/macOS development workflows.
Instructions
List test results from a build run or build action
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buildRunId | No | The ID of the build run to list test results for (provide either buildRunId or buildActionId) | |
| buildActionId | No | The ID of the build action to list test results for (provide either buildRunId or buildActionId) | |
| limit | No | Maximum number of test results to return (default: 100, max: 200) | |
| sort | No | Sort order for the results | |
| filter | No | ||
| include | No | Related resources to include in the response | |
| fields | No |
Implementation Reference
- src/handlers/workflows.ts:182-219 (handler)Core handler function that executes the tool logic: validates inputs, builds query parameters (limit, sort, filter, fields, include), constructs the App Store Connect API endpoint (/ciBuildRuns/{id}/testResults or /ciBuildActions/{id}/testResults), and fetches the CI test results.async listTestResults(args: { buildRunId?: string; buildActionId?: string; limit?: number; sort?: CiTestResultSortOptions; filter?: CiTestResultFilters; fields?: { ciTestResults?: CiTestResultFieldOptions[]; }; include?: CiTestResultIncludeOptions[]; }): Promise<CiTestResultsResponse> { const { buildRunId, buildActionId, limit = 100, sort, filter, fields, include } = args; if (!buildRunId && !buildActionId) { throw new Error('Either buildRunId or buildActionId must be provided'); } const params: Record<string, any> = { limit: sanitizeLimit(limit) }; if (sort) { params.sort = sort; } if (include?.length) { params.include = include.join(','); } Object.assign(params, buildFilterParams(filter)); Object.assign(params, buildFieldParams(fields)); const endpoint = buildRunId ? `/ciBuildRuns/${buildRunId}/testResults` : `/ciBuildActions/${buildActionId}/testResults`; return this.client.get<CiTestResultsResponse>(endpoint, params); }
- src/index.ts:1150-1215 (registration)Tool registration in buildToolsList(): defines the tool name 'list_ci_test_results', description, and detailed inputSchema matching the handler parameters.name: "list_ci_test_results", description: "List test results from a build run or build action", inputSchema: { type: "object", properties: { buildRunId: { type: "string", description: "The ID of the build run to list test results for (provide either buildRunId or buildActionId)" }, buildActionId: { type: "string", description: "The ID of the build action to list test results for (provide either buildRunId or buildActionId)" }, limit: { type: "number", description: "Maximum number of test results to return (default: 100, max: 200)", minimum: 1, maximum: 200 }, sort: { type: "string", description: "Sort order for the results", enum: ["className", "-className", "name", "-name", "status", "-status", "duration", "-duration"] }, filter: { type: "object", properties: { status: { type: "string", enum: ["SUCCESS", "FAILURE", "SKIPPED"], description: "Filter by test status" }, className: { type: "string", description: "Filter by test class name" }, name: { type: "string", description: "Filter by test name" } } }, include: { type: "array", items: { type: "string", enum: ["buildAction", "buildRun"] }, description: "Related resources to include in the response" }, fields: { type: "object", properties: { ciTestResults: { type: "array", items: { type: "string", enum: ["className", "name", "status", "fileLocation", "failureMessage", "duration"] }, description: "Fields to include for each test result" } } } } } }
- src/index.ts:1444-1448 (registration)Dispatch/registration in the MCP CallToolRequest handler switch statement: maps tool calls to the workflowHandlers.listTestResults method and formats the response.// CI Test Results Management case "list_ci_test_results": const testResultsData = await this.workflowHandlers.listTestResults(args as any); return formatResponse(testResultsData);
- src/types/workflows.ts:373-446 (schema)TypeScript type definitions for CiTestResult, CiTestResultsResponse, filters, sort options, field options, and include options used by the handler and schema.export interface CiTestResult { id: string; type: "ciTestResults"; attributes: { className?: string; name: string; status: "SUCCESS" | "FAILURE" | "SKIPPED"; fileLocation?: { filePath?: string; line?: number; }; failureMessage?: string; duration?: number; }; relationships?: { buildAction?: { data?: { id: string; type: "ciBuildActions"; }; }; buildRun?: { data?: { id: string; type: "ciBuildRuns"; }; }; }; } export interface CiTestResultsResponse { data: CiTestResult[]; included?: Array<{ id: string; type: "ciBuildActions" | "ciBuildRuns"; attributes: any; }>; links?: { self: string; first?: string; next?: string; }; meta?: { paging: { total: number; limit: number; }; }; } export interface CiTestResultFilters { status?: "SUCCESS" | "FAILURE" | "SKIPPED"; className?: string; name?: string; } export type CiTestResultSortOptions = | "className" | "-className" | "name" | "-name" | "status" | "-status" | "duration" | "-duration"; export type CiTestResultFieldOptions = | "className" | "name" | "status" | "fileLocation" | "failureMessage" | "duration"; export type CiTestResultIncludeOptions = | "buildAction" | "buildRun";