stop_suite_run
Stop an active BugBug test suite execution by providing the run ID to halt ongoing automated testing processes.
Instructions
Stop a running BugBug suite run
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | Suite run UUID to stop |
Implementation Reference
- src/tools/suiteRuns.ts:170-214 (handler)The complete tool definition for 'stop_suite_run', including handler logic that invokes the BugBug API to stop the suite run and formats the response as MCP content.export const stopSuiteRunTool: Tool = { name: 'stop_suite_run', title: 'Stop a running BugBug suite run', description: 'Stop a running BugBug suite run', inputSchema: z.object({ runId: z.string().describe('Suite run UUID to stop'), }).shape, handler: async ({ runId }) => { try { const response = await bugbugClient.stopSuiteRun(runId); if (response.status !== 200) { return { content: [ { type: 'text', text: `Error: ${response.status} ${response.statusText}`, }, ], }; } const status = response.data; return { content: [ { type: 'text', text: `**Suite Run Stopped:**\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 stopping suite run: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } } };
- src/tools/index.ts:11-33 (registration)Registration of all tools, including stop_suite_run from suiteRunsTools, using server.registerTool with the tool's name, schema, and handler.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/tools/suiteRuns.ts:174-176 (schema)Zod input schema for the stop_suite_run tool, validating the runId parameter.inputSchema: z.object({ runId: z.string().describe('Suite run UUID to stop'), }).shape,
- src/services/bugbugClient.ts:187-189 (helper)BugBug API client helper method that performs the HTTP POST request to stop the suite run.async stopSuiteRun(id: string): Promise<ApiResponse<BugBugSuiteRun>> { return this.makeRequest(`/suiteruns/${id}/stop/`, 'POST'); }