{
  "name": "web-record",
  "toolName": "web_record",
  "tier": "tool",
  "category": "consuming",
  "title": "Web Page Recording",
  "description": "Drive a headless browser (Playwright Python) to RECORD any URL to a video, then (by default) transcode to mp4, grab a cover frame, upload to VOD and return a playable CDN URL. Modes: fixed-duration recording, condition-triggered stop (element appears / disappears), auto-scroll from top to bottom, custom storyboards, and parameterized templates. Storyboard scenes: highlight / focus / zoom / scroll / virtual-cursor click / type / hover / caption / title-card / arrow / numbered sequence / redact / code-line highlight. For still images (png/jpg) use the web_screenshot tool instead. Use this tool whenever the user wants a video / recording / screencast of a web page: record a page, scroll-through video, page-from-top-to-bottom clip, demo of clicks/typing/hover, storyboard / multi-scene intro video, or a template-based clip.",
  "auth": "optional",
  "joinsTake": true,
  "envVars": [
    "WEB_CAPTURE_BROWSER",
    "WEB_CAPTURE_OUTPUT_BASE",
    "WEB_CAPTURE_NO_SANDBOX",
    "WEB_CAPTURE_ALLOW_PRIVATE_HOSTS",
    "PLAYWRIGHT_BROWSERS_PATH",
    "REMOTION_RENDER_API_URL",
    "PRIV_TOKEN"
  ],
  "entry": {
    "type": "python",
    "scriptPath": "../web-screenshot/scripts/record.py"
  },
  "parameters": {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "Target page URL (http/https). May be omitted only when a template or storyboard JSON supplies its own url."
      },
      "output": {
        "type": "string",
        "description": "Local output path, must end in .webm (default recording.webm)"
      },
      "browser": {
        "type": "string",
        "description": "chromium | firefox | webkit (default chromium; chromium recommended for recording)"
      },
      "device": {
        "type": "string",
        "description": "Device emulation name, e.g. 'iPhone 15 Pro'"
      },
      "viewport": {
        "type": "string",
        "description": "Viewport as 'width,height', e.g. '1280,720'"
      },
      "duration": {
        "type": "number",
        "description": "Fixed recording length in ms"
      },
      "stop_when_selector": {
        "type": "string",
        "description": "Stop recording once this CSS selector appears"
      },
      "stop_when_hidden": {
        "type": "string",
        "description": "Stop recording once this CSS selector disappears"
      },
      "max_duration": {
        "type": "number",
        "description": "Safety cap (ms) for condition-based stop modes (default 60000)"
      },
      "scroll_through": {
        "type": "boolean",
        "description": "Auto-scroll smoothly from top to bottom while recording"
      },
      "scroll_step": {
        "type": "number",
        "description": "Pixels per scroll step (default 60)"
      },
      "scroll_interval": {
        "type": "number",
        "description": "Interval between scroll steps in ms (default 50)"
      },
      "scroll_pause_top": {
        "type": "number",
        "description": "Pause at the top before scrolling, ms (default 800)"
      },
      "scroll_pause_bottom": {
        "type": "number",
        "description": "Pause at the bottom after scrolling, ms (default 1200)"
      },
      "storyboard": {
        "type": "string",
        "description": "Path to a storyboard JSON file describing scenes (mutually exclusive with template)"
      },
      "template": {
        "type": "string",
        "description": "Template name under templates/ (e.g. github-repo-intro); combine with param (mutually exclusive with storyboard)"
      },
      "param": {
        "type": "array",
        "description": "Template params as 'key=value' strings; repeatable"
      },
      "list_templates": {
        "type": "boolean",
        "description": "List available templates and exit"
      },
      "wait_for_selector": {
        "type": "string",
        "description": "Wait for this CSS selector before recording"
      },
      "wait_for_timeout": {
        "type": "number",
        "description": "Fixed wait (ms) before recording"
      },
      "color_scheme": {
        "type": "string",
        "description": "light | dark | no-preference (emulate prefers-color-scheme)"
      },
      "user_agent": {
        "type": "string",
        "description": "Override User-Agent"
      },
      "timeout": {
        "type": "number",
        "description": "Playwright global action timeout in ms"
      },
      "ignore_https_errors": {
        "type": "boolean",
        "description": "Ignore HTTPS certificate errors"
      },
      "storage_state": {
        "type": "string",
        "description": "storageState JSON file path (logged-in recording)"
      },
      "cookies": {
        "type": "string",
        "description": "Playwright cookies JSON string or file (top-level array)"
      },
      "no_upload": {
        "type": "boolean",
        "description": "Skip VOD upload; keep only the local webm. By default the recording is transcoded to mp4, a cover frame is grabbed, uploaded to VOD, and a playable CDN URL is returned."
      },
      "vod_title": {
        "type": "string",
        "description": "Title for the uploaded VOD asset (defaults to the output file name)"
      },
      "cover_at_sec": {
        "type": "number",
        "description": "Cover frame timestamp in seconds (default 0.5)"
      },
      "keep_webm": {
        "type": "boolean",
        "description": "Keep the local webm after a successful upload (default: delete it since VOD holds the copy)"
      }
    },
    "required": [
      "url"
    ]
  },
  "ui": {
    "primary": [
      "url",
      "duration",
      "scroll_through"
    ],
    "advanced": [
      "device",
      "viewport",
      "max_duration",
      "stop_when_selector",
      "stop_when_hidden",
      "scroll_step",
      "scroll_interval",
      "scroll_pause_top",
      "scroll_pause_bottom",
      "color_scheme",
      "wait_for_selector",
      "wait_for_timeout",
      "vod_title",
      "cover_at_sec",
      "browser"
    ],
    "hidden": [
      "output",
      "storyboard",
      "template",
      "param",
      "list_templates",
      "user_agent",
      "timeout",
      "ignore_https_errors",
      "storage_state",
      "cookies",
      "no_upload",
      "keep_webm"
    ]
  }
}
