Skip to main content
Glama

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,

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