Skip to main content
Glama
simplypixi

BugBug MCP Server

by simplypixi

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');
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. While 'Stop' implies a mutation operation, it doesn't disclose behavioral traits like whether this requires specific permissions, what happens to the test run (cancellation vs. termination), whether it's reversible, or any rate limits. The description is minimal beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple tool and front-loads the essential information ('Stop a running BugBug test run').

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., success status, error messages) or address potential side effects, leaving significant gaps in understanding the tool's behavior and outcomes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'runId' documented as 'Test run UUID to stop'. The description doesn't add any additional meaning beyond this, such as format examples or constraints, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Stop') and target resource ('a running BugBug test run'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from the sibling tool 'stop_suite_run' or other test management tools, which would be needed for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance about when to use this tool versus alternatives like 'wait_for_test_run' or when not to use it (e.g., on completed runs). It mentions the target is 'running' but doesn't clarify prerequisites or error conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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