get_suite_run
Retrieve detailed execution results for a specific test suite run using its unique identifier, enabling analysis of test outcomes and performance.
Instructions
Get detailed results of a BugBug suite run
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | Suite run UUID |
Implementation Reference
- src/tools/suiteRuns.ts:17-62 (handler)Executes the tool logic: fetches suite run data from bugbugClient.getSuiteRun, handles errors, formats test details and returns structured text response.handler: async ({ runId }) => { try { const response = await bugbugClient.getSuiteRun(runId); if (response.status !== 200) { return { content: [ { type: 'text', text: `Error: ${response.status} ${response.statusText}`, }, ], }; } const run = response.data as BugBugSuiteRun; let testDetails = ''; if (run.details && run.details.length > 0) { testDetails = run.details.map((test: BugBugTestDetail) => ` - **${test.name}** (${test.status}) - Duration: ${test.duration || 'N/A'}` ).join('\n'); } else { testDetails = ' No test details available'; } return { content: [ { type: 'text', text: `**Suite Run Details:**\n\n- **Name:** ${run.name}\n- **ID:** ${run.id}\n- **Status:** ${run.status}\n- **Duration:** ${run.duration || 'N/A'}\n- **Queued:** ${run.queued || 'N/A'}\n- **Error Code:** ${run.errorCode || 'None'}\n- **Web App URL:** ${run.webappUrl}\n\n**Test Results:**\n${testDetails}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching suite run: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } }
- src/tools/suiteRuns.ts:14-16 (schema)Zod schema for tool input: requires 'runId' as string.inputSchema: z.object({ runId: z.string().describe('Suite run UUID'), }).shape,
- src/tools/index.ts:11-33 (registration)Registers the get_suite_run tool (via suiteRunsTools) with the MCP server by collecting all tools and calling server.registerTool for each.export function registerAllTools(server: McpServer): void { const tools: Record<string, Tool> = { ...configTools, ...testsTools, ...testRunsTools, ...suitesTools, ...suiteRunsTools, ...profilesTools, ...advancedTools, }; for (const t in tools) { server.registerTool( tools[t].name, { description: tools[t].description, inputSchema: tools[t].inputSchema, annotations: { title: tools[t].title }, }, (args: unknown) => tools[t].handler(args as unknown) ); } }
- src/services/bugbugClient.ts:175-177 (helper)BugBug API client method that performs the HTTP request to retrieve suite run details, used by the tool handler.async getSuiteRun(id: string): Promise<ApiResponse<BugBugSuiteRun>> { return this.makeRequest(`/suiteruns/${id}/`); }
- src/index.ts:42-42 (registration)Top-level call to register all tools, including get_suite_run, on the MCP server instance.registerAllTools(server);