Skip to main content
Glama
simplypixi

BugBug MCP Server

by simplypixi

wait_for_suite_run

Monitors a test suite execution in BugBug by polling for completion status, returning detailed run results when finished. Configure timeout and polling intervals to manage wait duration.

Instructions

Waits until suite run finished, returns full suite run data as result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pollIntervalSecondsNoPolling interval in seconds (default: 10)
runIdYesSuite run UUID to wait for
timeoutMinutesNoMaximum time to wait in minutes (default: 30)

Implementation Reference

  • The handler function implements polling logic to wait for a suite run to finish by repeatedly calling bugbugClient.getSuiteRun until the status is finished or timeout is reached. Returns text content with status or error.
    handler: async ({ runId, timeoutMinutes, pollIntervalSeconds }) => {
      try {
        const timeoutMs = timeoutMinutes * 60 * 1000;
        const pollIntervalMs = pollIntervalSeconds * 1000;
        
        let run = await bugbugClient.getSuiteRun(runId);
        
        if (isFinishedRunStatus(run.data.status)) {
          return {
            content: [
              {
                type: 'text',
                text: `Suite run ${run.data.id} completed with status: ${run.data.status}`,
              },
            ],
          };
        }
        
        const startTime = Date.now();
        
        while (Date.now() - startTime < timeoutMs) {
          await new Promise(resolve => setTimeout(resolve, pollIntervalMs));
          run = await bugbugClient.getSuiteRun(runId);
          
          if (isFinishedRunStatus(run.data.status)) {
            return {
              content: [
                {
                  type: 'text',
                  text: `Suite run ${run.data.id} completed with status: ${run.data.status}`,
                },
              ],
            };
          }
        }
        
        return {
          content: [
            {
              type: 'text',
              text: `Suite run ${runId} did not complete within ${timeoutMinutes} minutes`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error waiting for suite run: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
        };
      }
    },
  • Input schema using Zod that validates runId (string, required), timeoutMinutes (number, optional default 30), pollIntervalSeconds (number, optional default 10).
    inputSchema: z.object({
      runId: z.string().describe('Suite run UUID to wait for'),
      timeoutMinutes: z.number().optional().default(30).describe('Maximum time to wait in minutes (default: 30)'),
      pollIntervalSeconds: z.number().optional().default(10).describe('Polling interval in seconds (default: 10)'),
    }).shape,
  • Registration function that imports all tool modules including advancedTools containing waitForSuiteRunTool, collects them in a record, and registers each with the MCP server using server.registerTool, wrapping the 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)
        );
      }
    }
Behavior4/5

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

Annotations only provide a title ('Wait for suite run to finish'), which doesn't cover behavioral traits. The description adds valuable context: it discloses that this is a blocking operation that waits until completion, involves polling (implied by 'waits'), and returns full suite run data. However, it doesn't specify error handling, what happens on timeout, or whether it's idempotent, leaving some behavioral aspects unclear.

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 that front-loads the core action and result. Every word earns its place: 'waits until suite run finished' specifies the behavior, and 'returns full suite run data as result' clarifies the outcome. There is no redundancy or unnecessary elaboration, making it highly concise and well-structured.

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

Completeness3/5

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

Given the tool's complexity (blocking wait operation with polling and timeout) and the absence of an output schema, the description is somewhat incomplete. It mentions returning 'full suite run data' but doesn't describe the format or what 'full' entails. With no annotations covering behavioral aspects and no output schema, more details on the return value or error conditions would enhance completeness, though the core purpose is clear.

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 clear documentation for all parameters (runId, pollIntervalSeconds, timeoutMinutes). The description doesn't add any parameter-specific semantics beyond what the schema provides, such as explaining the polling mechanism or timeout behavior in more detail. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 ('waits until suite run finished') and the resource ('suite run'), with the outcome ('returns full suite run data as result'). It distinguishes from siblings like 'get_suite_run_status' (which likely returns status only) by emphasizing waiting for completion and returning full data. However, it doesn't explicitly contrast with 'wait_for_test_run', which is a similar tool for test runs rather than suite runs.

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

Usage Guidelines3/5

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

The description implies usage when you need to wait for a suite run to finish and retrieve its full data, but it doesn't provide explicit guidance on when to use this versus alternatives like 'get_suite_run_status' (for quick status checks) or 'get_suite_run' (for immediate data without waiting). No exclusions or prerequisites are mentioned, leaving usage context somewhat inferred rather than clearly defined.

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