Skip to main content
Glama

stop_test_run

Stop an active BugBug test run by providing its unique run ID to halt execution and conserve testing resources.

Instructions

Stop a running BugBug test run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesTest run UUID to stop

Implementation Reference

  • The handler function that executes the stop_test_run tool logic: calls the BugBug client to stop the run, handles response or error, and returns formatted text content.
    handler: async ({ runId }) => { try { const response = await bugbugClient.stopTestRun(runId); if (response.status !== 200) { return { content: [ { type: 'text', text: `Error: ${response.status} ${response.statusText}`, }, ], }; } const status = response.data; return { content: [ { type: 'text', text: `**Test 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 test run: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } }
  • The Zod input schema for the stop_test_run tool, validating the runId parameter.
    inputSchema: z.object({ runId: z.string().describe('Test run UUID to stop'), }).shape,
  • Imports the testRuns tools module (including stopTestRunTool) and registers all tools with the MCP server, using the tool's name, description, schema, and handler.
    import * as testRunsTools from './testRuns.js'; import * as suitesTools from './suites.js'; import * as suiteRunsTools from './suiteRuns.js'; import * as profilesTools from './profiles.js'; import * as advancedTools from './advanced.js'; 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) ); } }
  • The BugBugApiClient helper method that performs the HTTP POST request to the BugBug API endpoint to stop a test run.
    async stopTestRun(id: string): Promise<ApiResponse<BugBugTestRun>> { return this.makeRequest(`/testruns/${id}/stop/`, 'POST'); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/simplypixi/bugbug-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server