{
  "name": "web-screenshot",
  "toolName": "web_screenshot",
  "tier": "tool",
  "category": "consuming",
  "title": "Web Page Screenshot",
  "description": "Drive a headless browser (Playwright Python) to capture any URL to a local STILL IMAGE (png/jpg): full-page / viewport / element / region screenshots, with device emulation, waiting, hide/mask/redact, and static annotations (highlight / arrow / caption / numbered sequence / redact). Images only — for video / recording / scroll-through / storyboard clips (webm) use the web_record tool instead.",
  "auth": "none",
  "envVars": [
    "WEB_CAPTURE_BROWSER",
    "WEB_CAPTURE_OUTPUT_BASE",
    "WEB_CAPTURE_NO_SANDBOX",
    "WEB_CAPTURE_ALLOW_PRIVATE_HOSTS",
    "PLAYWRIGHT_BROWSERS_PATH"
  ],
  "entry": {
    "type": "python",
    "scriptPath": "scripts/screenshot.py"
  },
  "parameters": {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "Target page URL (http/https)"
      },
      "output": {
        "type": "string",
        "description": "Local output path, must be an image (*.png / *.jpg, default screenshot.png). For .webm video use the web_record tool."
      },
      "browser": {
        "type": "string",
        "description": "chromium | firefox | webkit (default chromium)"
      },
      "device": {
        "type": "string",
        "description": "Device emulation name, e.g. 'iPhone 15 Pro'"
      },
      "viewport": {
        "type": "string",
        "description": "Viewport as 'width,height', e.g. '1280,800'"
      },
      "full_page": {
        "type": "boolean",
        "description": "screenshot.py: capture the whole scrollable page"
      },
      "selector": {
        "type": "string",
        "description": "screenshot.py: capture only the element matching this CSS selector"
      },
      "clip": {
        "type": "string",
        "description": "screenshot.py: region clip 'x,y,w,h' (combined with selector = offset from element box)"
      },
      "wait_for_selector": {
        "type": "string",
        "description": "Wait for this CSS selector before acting"
      },
      "wait_for_timeout": {
        "type": "number",
        "description": "Fixed wait (ms) before acting"
      },
      "annotate": {
        "type": "string",
        "description": "screenshot.py: annotation JSON file or string (array or {annotations, settleMs})"
      },
      "storage_state": {
        "type": "string",
        "description": "storageState JSON file path (logged-in capture)"
      },
      "cookies": {
        "type": "string",
        "description": "Playwright cookies JSON string or file (top-level array)"
      }
    },
    "required": [
      "url"
    ]
  },
  "ui": {
    "primary": [
      "url",
      "full_page"
    ],
    "advanced": [
      "selector",
      "device",
      "viewport",
      "wait_for_selector",
      "wait_for_timeout",
      "browser",
      "clip",
      "annotate",
      "output"
    ],
    "hidden": [
      "storage_state",
      "cookies"
    ]
  }
}
