get_test_run_status
Check the current execution status of a BugBug test run by providing its unique identifier to monitor progress and completion.
Instructions
Get current status of a BugBug test run
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | Test run UUID |
Implementation Reference
- src/tools/testRuns.ts:129-165 (handler)The async handler function for the 'get_test_run_status' tool. It fetches the test run status using bugbugClient and returns a formatted text response with status details or error.handler: async ({ runId }) => { try { const statusResponse = await bugbugClient.getTestRunStatus(runId); if (statusResponse.status !== 200) { return { content: [ { type: 'text', text: `Error: ${statusResponse.status} ${statusResponse.statusText}`, }, ], }; } const status = statusResponse.data; return { content: [ { type: 'text', text: `**Test Run Status:**\n\n- **ID:** ${status.id}\n- **Status:** ${status.status}\n- **Last Modified:** ${status.modified}\n- **Web App URL:** ${status.webappUrl}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching test run status: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } }
- src/tools/testRuns.ts:126-128 (schema)Zod input schema defining the required 'runId' parameter as a string.inputSchema: z.object({ runId: z.string().describe('Test run UUID'), }).shape,
- src/tools/index.ts:11-33 (registration)The registerAllTools function imports testRunsTools (containing getTestRunStatusTool) and registers it along with other tools on the MCP server using server.registerTool.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:234-236 (helper)The BugBugApiClient.getTestRunStatus helper method that makes the API GET request to retrieve the test run status from '/testruns/{id}/status/'.async getTestRunStatus(id: string): Promise<ApiResponse<BugBugRunStatusResponse>> { return this.makeRequest(`/testruns/${id}/status/`); }