Skip to main content
Glama
simplypixi

BugBug MCP Server

by simplypixi

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
NameRequiredDescriptionDefault
runIdYesSuite run UUID to stop

Implementation Reference

  • 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'}`,
                },
              ],
            };
          }
        }
    };
  • 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)
        );
      }
    }
  • 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,
  • 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');
    }

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