Skip to main content
Glama
simplypixi

BugBug MCP Server

by simplypixi

get_suite_run_screenshots

Retrieve screenshots captured during a specific BugBug test suite run to analyze test execution steps and identify issues.

Instructions

Get screenshots from a BugBug suite run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesSuite run UUID

Implementation Reference

  • The complete tool definition for 'get_suite_run_screenshots', including the handler function that fetches and formats screenshots from a suite run.
    export const getSuiteRunScreenshotsTool: Tool = {
      name: 'get_suite_run_screenshots',
      title: 'Get screenshots from a BugBug suite run',
      description: 'Get screenshots from a BugBug suite run',
      inputSchema: z.object({
        runId: z.string().describe('Suite run UUID'),
      }).shape,
      handler: async ({ runId }) => {
          try {
    
            const response = await bugbugClient.getSuiteRunScreenshots(runId);
            
            if (response.status !== 200) {
              return {
                content: [
                  {
                    type: 'text',
                    text: `Error: ${response.status} ${response.statusText}`,
                  },
                ],
              };
            }
    
            const screenshots = response.data;
            
            let screenshotsList = '';
            if (screenshots.testsRuns && screenshots.testsRuns.length > 0) {
              screenshotsList = screenshots.testsRuns.map((testRun: { id: string; name: string; stepsRuns?: BugBugStepDetail[] }) => {
                const stepScreenshots = testRun.stepsRuns?.map((step: BugBugStepDetail) => 
                  `    - Step ${step.stepId}: ${step.screenshots?.[0]?.url || 'No screenshot'}`
                ).join('\n') || '    No step screenshots';
                
                return `  **Test ${testRun.id}:**\n${stepScreenshots}`;
              }).join('\n\n');
            } else {
              screenshotsList = 'No screenshots available';
            }
            
            return {
              content: [
                {
                  type: 'text',
                  text: `**Suite Run Screenshots (ID: ${screenshots.id}):**\n\n${screenshotsList}`,
                },
              ],
            };
          } catch (error) {
            return {
              content: [
                {
                  type: 'text',
                  text: `Error fetching suite run screenshots: ${error instanceof Error ? error.message : 'Unknown error'}`,
                },
              ],
            };
          }
        }
    };
  • The registerAllTools function registers the get_suite_run_screenshots tool (imported via suiteRunsTools) with the MCP server.
    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)
        );
      }
    }
  • Helper method in BugBugApiClient that makes the API request to retrieve screenshots for the given suite run ID.
    async getSuiteRunScreenshots(id: string): Promise<ApiResponse<BugBugScreenshotResponse>> {
      return this.makeRequest(`/suiteruns/${id}/screenshots/`);
    }
  • Zod input schema for the get_suite_run_screenshots tool, validating the runId parameter.
    inputSchema: z.object({
      runId: z.string().describe('Suite run UUID'),
    }).shape,
Behavior3/5

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

Annotations only provide a title that restates the description, offering no behavioral hints. The description doesn't add meaningful behavioral context beyond the basic action—it doesn't mention whether this is a read-only operation, what format screenshots are returned in, if there are rate limits, or any other behavioral traits. However, it doesn't contradict annotations either.

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 directly states the tool's purpose without any unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 simple single-parameter schema, lack of annotations, and no output schema, the description is minimally adequate. It explains what the tool does but lacks details about return values, error conditions, or behavioral context that would be helpful for an AI agent. It's complete enough for basic understanding but leaves gaps.

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?

The input schema has 100% description coverage, with the single parameter 'runId' clearly documented as 'Suite run UUID'. The description adds no additional parameter semantics beyond what the schema provides, 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 verb ('Get') and resource ('screenshots from a BugBug suite run'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_test_run_screenshots', but the specificity of 'suite run' versus 'test run' provides some implicit distinction.

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 on when to use this tool versus alternatives. There are multiple screenshot-related tools (e.g., 'get_test_run_screenshots') and other suite run tools (e.g., 'get_suite_run', 'get_suite_run_status'), but the description doesn't indicate when this specific tool is appropriate or what makes it different.

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