Skip to main content
Glama

interceptor_chrome_devtools_screenshot

Capture screenshots from Chrome DevTools sessions to document network traffic analysis or debugging scenarios during proxy-based interception.

Instructions

Take a screenshot using the bound Chrome DevTools session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
devtools_session_idYesSession ID from interceptor_chrome_devtools_attach
file_pathNoOptional path to save screenshot
formatNoImage format
full_pageNoCapture the full page
qualityNoCompression quality for jpeg/webp

Implementation Reference

  • The handler for 'interceptor_chrome_devtools_screenshot' which takes a screenshot using a bound Chrome DevTools session and optionally saves it to a file.
      "interceptor_chrome_devtools_screenshot",
      "Take a screenshot using the bound Chrome DevTools session.",
      {
        devtools_session_id: z.string().describe("Session ID from interceptor_chrome_devtools_attach"),
        file_path: z.string().optional().describe("Optional path to save screenshot"),
        format: z.enum(["png", "jpeg", "webp"]).optional().describe("Image format"),
        full_page: z.boolean().optional().default(false).describe("Capture the full page"),
        quality: z.number().optional().describe("Compression quality for jpeg/webp"),
      },
      async ({ devtools_session_id, file_path, format, full_page, quality }) => {
        try {
          const { targetId } = await ensureSessionTargetIsAlive(devtools_session_id);
          const args: Record<string, unknown> = {};
          if (file_path) args.filePath = file_path;
          if (format) args.format = format;
          if (full_page) args.fullPage = true;
          if (quality !== undefined) args.quality = quality;
    
          const devtoolsResult = await devToolsBridge.callAction(devtools_session_id, "screenshot", args);
          const screenshot = await persistScreenshotIfRequested(devtoolsResult, file_path);
          return {
            content: [{
              type: "text",
              text: truncateResult({
                status: "success",
                devtools_session_id,
                target_id: targetId,
                devtoolsResult: sanitizeDevToolsPayload(devtoolsResult),
                ...screenshot,
              }),
            }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: errorToString(e) }) }] };
        }
      },
    );

Tool Definition Quality

Score is being calculated. Check back soon.

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/yfe404/proxy-mcp'

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