Skip to main content
Glama

autonomous-frontend-browser-tools

screenshot.ts1.38 kB
/** * Refactor Temp: Tool — captureBrowserScreenshot * Core, stateless helpers for screenshot capture flow from browser-connector.ts. * Keep Express bindings and WebSocket message sending in the main file. */ export interface ScreenshotServiceConfig { returnImageData: boolean; baseDirectory?: string; projectName?: string; } export interface ScreenshotSaveResult { filePath: string; filename: string; projectDirectory?: string; urlCategory?: string; imageData?: string; } /** * Shape successful response payload based on result from ScreenshotService.saveScreenshot */ export function buildScreenshotResponse(result: ScreenshotSaveResult) { const response: any = { filePath: result.filePath, filename: result.filename, projectDirectory: result.projectDirectory, urlCategory: result.urlCategory, }; if (result.imageData) { response.imageData = result.imageData; } return response; } /** * Build screenshot configuration for the service call (pure function). * Prefers projectScreenshotPath, falls back to customPath from extension. */ export function buildScreenshotConfig( projectScreenshotPath?: string, customPath?: string, projectName?: string ): ScreenshotServiceConfig { return { returnImageData: true, baseDirectory: projectScreenshotPath || customPath, projectName: projectName, }; }

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/Winds-AI/Frontend-development-MCP-tools-public'

If you have feedback or need assistance with the MCP directory API, please join our Discord server