Skip to main content
Glama
simplypixi

BugBug MCP Server

by simplypixi

get_test_run_status

Check the current execution status of a BugBug test run by providing its unique identifier to monitor progress and completion.

Instructions

Get current status of a BugBug test run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesTest run UUID

Implementation Reference

  • The async handler function for the 'get_test_run_status' tool. It fetches the test run status using bugbugClient and returns a formatted text response with status details or error.
    handler: async ({ runId }) => {
        try {
    
          const statusResponse = await bugbugClient.getTestRunStatus(runId);
          
          if (statusResponse.status !== 200) {
            return {
              content: [
                {
                  type: 'text',
                  text: `Error: ${statusResponse.status} ${statusResponse.statusText}`,
                },
              ],
            };
          }
    
          const status = statusResponse.data;
          
          return {
            content: [
              {
                type: 'text',
                text: `**Test Run Status:**\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 fetching test run status: ${error instanceof Error ? error.message : 'Unknown error'}`,
              },
            ],
          };
        }
      }
  • Zod input schema defining the required 'runId' parameter as a string.
    inputSchema: z.object({
      runId: z.string().describe('Test run UUID'),
    }).shape,
  • The registerAllTools function imports testRunsTools (containing getTestRunStatusTool) and registers it along with other tools on the MCP server using server.registerTool.
    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.getTestRunStatus helper method that makes the API GET request to retrieve the test run status from '/testruns/{id}/status/'.
    async getTestRunStatus(id: string): Promise<ApiResponse<BugBugRunStatusResponse>> {
      return this.makeRequest(`/testruns/${id}/status/`);
    }

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