{
  "schemaVersion": 1,
  "version": "0.9.9",
  "source": "https://github.com/neonn0d/dea",
  "tools": [
    {
      "name": "arm_network",
      "description": "Turn network capture on for the active tab BEFORE the next navigate, so load-time requests are caught instead of missed (get_network alone only starts capturing when first called, after the load). Pass on:true to arm, on:false to disarm. Off by default: attaching the DevTools protocol is a detectable automation signal some sites watch for, so arm only when you specifically need load-time traffic. Arming persists across that tab's navigations.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "on": {
            "description": "true to arm capture before navigate (default), false to disarm",
            "type": "boolean"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "batch",
      "description": "Use for already-known selectors/refs or repeated mechanical actions. A step acts inside an iframe with args.frame, like the single tools. Run a scripted sequence of steps in ONE call, optionally repeated — use this for mechanical loops with no decisions in them (scroll a timeline 20 times, fill-and-submit a known form, like every visible post) instead of paying a full round-trip per action. steps is an array of {tool, args}; allowed step tools: navigate, click, type_text, paste_text, press_key, blur, hover, select_option, fill_form, upload_file, scroll, wait_for, get_state, sleep({ms}). For different records use rows:[{field:\"value\"},...] with {{field}} placeholders in string args, instead of separate calls. A final read then runs only after the last row. times repeats the whole sequence (max 25; max 200 executed steps total); the placeholder {i} in any string arg becomes the 1-based iteration number, so selector '.post:nth-of-type({i}) button' addresses successive items. Stops at the first error unless continue_on_error. Returns a compact per-step log. One read_page, get_page_text, or inspect step may be LAST; its result is returned under read. Screenshots cannot be batched. Per-action page feedback is suppressed; use individual actions when intermediate confirmation matters.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "steps": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "enum": [
                    "navigate",
                    "click",
                    "type_text",
                    "paste_text",
                    "press_key",
                    "blur",
                    "hover",
                    "select_option",
                    "fill_form",
                    "upload_file",
                    "scroll",
                    "wait_for",
                    "get_state",
                    "sleep",
                    "get_page_text",
                    "inspect",
                    "read_page"
                  ]
                },
                "args": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "tool"
              ],
              "additionalProperties": false
            },
            "description": "Steps run in order, e.g. [{tool:'scroll',args:{pixels:800}},{tool:'sleep',args:{ms:400}}]"
          },
          "before": {
            "description": "One-time setup steps before rows or times, e.g. click Start. Literal arguments; no placeholders or terminal reads. Counts toward 200 actions. Entire batch validated first; setup failure always stops.",
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "enum": [
                    "navigate",
                    "click",
                    "type_text",
                    "paste_text",
                    "press_key",
                    "blur",
                    "hover",
                    "select_option",
                    "fill_form",
                    "upload_file",
                    "scroll",
                    "wait_for",
                    "get_state",
                    "sleep",
                    "get_page_text",
                    "inspect",
                    "read_page"
                  ]
                },
                "args": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "tool"
              ],
              "additionalProperties": false
            }
          },
          "times": {
            "description": "Repeat identical steps (default 1, max 25); mutually exclusive with rows",
            "type": "integer",
            "minimum": 1,
            "maximum": 25
          },
          "rows": {
            "description": "Run one template per record, substituting {{field}} in string args. Example: steps:[{tool:\"type_text\",args:{selector:\"#name\",text:\"{{name}}\"}}], rows:[{name:\"Alex\"},{name:\"Sam\"}]. Use instead of times. All rows validated before effects; max 200 actions. A final read step runs only after the last row.",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "items": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "continue_on_error": {
            "description": "Keep going past failed steps (default false)",
            "type": "boolean"
          },
          "wait_for": {
            "description": "Final read completion condition, captured before the last click/navigation/Enter. For SPA filtering use {selector: observed results container, changed:true}; an existing selector alone is insufficient.",
            "type": "object",
            "properties": {
              "selector": {
                "type": "string",
                "minLength": 1
              },
              "text": {
                "type": "string",
                "minLength": 1
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "changed": {
                "type": "boolean",
                "const": true
              },
              "timeout_ms": {
                "type": "integer",
                "minimum": 1,
                "maximum": 15000
              }
            },
            "additionalProperties": false
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "steps"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "bind_workspace",
      "description": "Bind this MCP client exclusively to a workspace (from list_workspaces). Dea identifies the client by its terminal, MCP session or process; no headers needed. Open the workspace once in Dea first. Calls then continue while it is hidden. release:true frees it; an idle binding expires after 10 minutes.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "release": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "blur",
      "description": "Unfocus a field to commit its value. Some editors only push the typed text into the app's own state when the field loses focus — Instagram's post caption is the classic case: it looks typed but publishes blank, and Share can stay disabled, until the field is blurred. Call this after type_text, before clicking Share/Done. Pass a selector, or omit to blur whatever is focused. Do NOT use it on a chat/comment box you send with Enter.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "description": "Field to blur; omit to blur the focused element",
            "type": "string"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "check_page",
      "description": "Check whether the current page is actually healthy, instead of guessing from a screenshot. Returns healthy (true/false) with the evidence: uncaught JS exceptions, console errors, failed page loads, failed/4xx/5xx requests, and whether the app mounted any content (catches a blank white-screen render crash). Scopes to the current page (everything since its last navigation) unless since_seq is given. Call this after making a change and reloading to confirm nothing broke before reporting done; if it comes back unhealthy, the errors carry the message (and source/line when the page provides it). Request-level failures need network capture running (arm_network) — a failed main-page load is always caught regardless.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "since_seq": {
            "description": "Only count errors/events after this seq (pass a prior check's checkedSeq to see just what changed)",
            "type": "number"
          },
          "include_warnings": {
            "description": "Also list console warnings (default false)",
            "type": "boolean"
          },
          "include_requests": {
            "description": "Include failed requests from network capture (default true)",
            "type": "boolean"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "clear_network",
      "description": "Clear the captured network log. Useful before triggering an action you want to inspect in isolation.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "click",
      "description": "Click a target by selector, ref, or its visible text. selector may be a CSS selector OR a ref from read_page (the [n], passed as \"12\" or \"@12\") — a ref needs no ref_selector call first. Scrolls into view, sends a real mouse click, and returns the page state after (url, title, and any errors/navigations the click triggered), so you usually don't need a follow-up read.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string"
          },
          "text": {
            "type": "string",
            "minLength": 1
          },
          "within": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object",
                "properties": {
                  "heading": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "heading"
                ],
                "additionalProperties": false
              }
            ]
          },
          "expect_download": {
            "type": "boolean"
          },
          "dir": {
            "type": "string"
          },
          "read": {
            "type": "boolean"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "close_tab",
      "description": "Close a tab (from list_tabs; the active one if tab_id is omitted). Use it to clean up tabs you opened. Refuses to close the last tab.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tab_id": {
            "description": "Which tab (default: the active one)",
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "compare",
      "description": "Compare this tab with a Figma frame (rendered by the Figma file open in another Dea tab; API only as fallback). Sizes the tab to the frame itself, waits for the page to stop moving, hides dev overlays and scrollbars for the capture. Returns elements: how far each design text and the box around it is off on the page (e.g. Continue (its box): dy +8, dh +3), biggest first: fix from these. Also the reference beside the page with changed pixels in red, and pixel counts. mode:'layout' ignores colours (a store theme on a brand design).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "frame": {
            "type": "object",
            "properties": {
              "file_url": {
                "type": "string",
                "format": "uri"
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "file_url",
              "id"
            ],
            "additionalProperties": false
          },
          "dir": {
            "type": "string"
          },
          "mode": {
            "description": "'layout': compare where things are drawn, ignoring colour",
            "type": "string",
            "enum": [
              "pixels",
              "layout"
            ]
          },
          "mask": {
            "description": "CSS selectors to hide for the capture (chat widgets, banners)",
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "keep_viewport": {
            "description": "Keep the current viewport instead of sizing the tab to the frame",
            "type": "boolean"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "frame"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "configure_workspace",
      "description": "Save named startup tabs/viewports and a screenshot directory on this workspace. Optional branch+worktree_path creates a Git worktree in a NEW folder; existing shells are left running and future shells use it. Closing/removing the workspace never deletes the worktree.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "startup_tabs": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "viewport": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "preset": {
                          "type": "string",
                          "enum": [
                            "mobile",
                            "tablet",
                            "laptop",
                            "desktop",
                            "wide"
                          ]
                        }
                      },
                      "required": [
                        "preset"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "width": {
                          "type": "integer",
                          "minimum": 240,
                          "maximum": 3840
                        },
                        "height": {
                          "type": "integer",
                          "minimum": 320,
                          "maximum": 2400
                        }
                      },
                      "required": [
                        "width",
                        "height"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "required": [
                "name",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "screenshot_dir": {
            "type": "string",
            "minLength": 1
          },
          "branch": {
            "type": "string",
            "minLength": 1
          },
          "worktree_path": {
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "design_map",
      "description": "The project's design map: which Figma screen is which page and source files of the app, what is built, missing, or changed in Figma since it was built. Saved in the project (.dea/design-map.json and .md), or with outside:true in Dea's own folder, so it is there in every later session. Read it before building UI from Figma; write to it after. action get (default): the map, one row per screen; filter with status and query. action sync: re-read the Figma file open in a Dea tab; new frames become missing, deleted ones are flagged, built screens whose design moved become changed (with what changed). It never alters what agents recorded. action set: record a screen: frame plus url/route, files, status, notes (or screens:[...] for several). status built stores the design's current fingerprint, so later design changes show as changed.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "outside": {
            "description": "Keep this project's map in Dea's own folder instead of <project>/.dea (nothing in the repo). Sticks for later calls.",
            "type": "boolean"
          },
          "action": {
            "description": "Default get",
            "type": "string",
            "enum": [
              "get",
              "sync",
              "set"
            ]
          },
          "frame": {
            "description": "Figma frame id (1:13 or 1-13) or exact frame name",
            "type": "string",
            "minLength": 1
          },
          "url": {
            "description": "Address of the page that implements it; alone (no frame) it records a page of the app that has no Figma screen",
            "type": "string"
          },
          "route": {
            "description": "Route in the app, like /login",
            "type": "string"
          },
          "files": {
            "description": "Source files that build it (replaces the list)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "component": {
            "type": "string"
          },
          "status": {
            "description": "set: built, check, missing or ignored. get: only these statuses (built, changed, check, missing, ignored, removed, ours_only)",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "notes": {
            "type": "string"
          },
          "project_dir": {
            "description": "Your app's folder; defaults to the current Dea project",
            "type": "string"
          },
          "file": {
            "description": "Figma file URL or key, when the map has several",
            "type": "string"
          },
          "query": {
            "description": "get: words that must appear in a screen's name, page, route, files or notes",
            "type": "string"
          },
          "limit": {
            "description": "get: most screens returned (default 200)",
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          "screens": {
            "description": "set: several screens in one call",
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "frame": {
                  "description": "Figma frame id (1:13 or 1-13) or exact frame name",
                  "type": "string",
                  "minLength": 1
                },
                "url": {
                  "description": "Address of the page that implements it; alone (no frame) it records a page of the app that has no Figma screen",
                  "type": "string"
                },
                "route": {
                  "description": "Route in the app, like /login",
                  "type": "string"
                },
                "files": {
                  "description": "Source files that build it (replaces the list)",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "component": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "built",
                    "check",
                    "missing",
                    "ignored"
                  ]
                },
                "notes": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "download_file",
      "description": "Save a file FROM the page to disk: an image, an attachment, any media. The fetch runs in the page, so it uses the logged-in session and works for auth-gated media. Give the selector of an image/link/element, or a direct url. Saves under ~/Documents/Dea/Downloads/<date>/ unless name/dir is given.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "description": "An img, link, or element whose media to save",
            "type": "string"
          },
          "url": {
            "description": "A direct url to download instead of a selector",
            "type": "string"
          },
          "name": {
            "description": "Filename to save as (extension inferred if omitted)",
            "type": "string"
          },
          "dir": {
            "description": "Folder to save into (default ~/Documents/Dea/Downloads/<date>/)",
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "element_screenshot",
      "description": "Capture just one element (a post, a card, a message) instead of the whole viewport. Scrolls it into view and crops to its bounding box. Pass name to also save the PNG to disk.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string"
          },
          "name": {
            "description": "Save to disk as <name>.png and return the path",
            "type": "string"
          },
          "dir": {
            "description": "Folder to save into (default ~/Documents/Dea/Screenshots/<date>/)",
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "selector"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "execute_js",
      "description": "Read targeted page data or perform operations other tools cannot; use get_page_text/read_page for ordinary research. Consolidate related fields into one extraction. Prefer visible text; whole-body textContent includes scripts/styles and hidden data. Preserve nearby qualifiers and footnotes. Return an expression or use an IIFE; async work needs (async () => { ... })(), not bare top-level await. Returns the JSON-serialized result. Do not fake clicks or typing.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "timeout_ms": {
            "description": "How long the code may run, default 15000. Raise it for a long scan instead of splitting the work",
            "type": "integer",
            "minimum": 1000,
            "maximum": 300000
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "code"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "extract_design",
      "description": "Fingerprint a page's (or a subtree's) visual design for comparison: walk the visible DOM and return, each sorted by frequency with counts, the palette (text and background colors, normalized to hex/rgb), the fonts in use, the type scale (font sizes), the weights, the line-heights, the spacing scale (non-zero margin/padding/gap values), the corner radii, and a headings summary (h1-h3 and large text, with their size, weight, and color). Compact integers, top values only. Run it on site A and site B and diff the two small objects to see where a new build drifts from the original. Pass scope to fingerprint one part of the page, top to change how many values per group, max_elements to cap the walk (default 4000; the result says if it was capped).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "scope": {
            "description": "CSS selector to fingerprint just that subtree (default: whole page)",
            "type": "string"
          },
          "top": {
            "description": "Values to keep per group, most frequent first (default 12)",
            "type": "number"
          },
          "max_elements": {
            "description": "Cap on elements walked (default 4000)",
            "type": "number"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "figma_match",
      "description": "Pair each screen of a Figma file with the page of your app that implements it, and list what is missing on each side. Open the Figma file in a Dea tab first. pages are your app's pages: addresses (loaded in background tabs that are never shown and closed afterwards) or names/ids of open tabs. Each Figma frame's name and texts are compared with each page's title, path, headings, button/link labels and visible text, by text overlap and by Jev. Returns pairs (frame, our page, Jev probability, overlap, verdict confident|check), figma_only (designed, not built) and ours_only (built, not in Figma). Without a TypeSafe key it matches by text overlap only. The pairs are saved in the project's design map (see design_map) unless save is false.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url": {
            "description": "Figma file URL; defaults to the Figma file open in a tab",
            "type": "string",
            "format": "uri"
          },
          "page": {
            "description": "Only frames on this Figma page (by name); default all pages",
            "type": "string"
          },
          "pages": {
            "minItems": 1,
            "maxItems": 40,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Your app's pages: http/https/file addresses, or names/ids of open tabs"
          },
          "save": {
            "description": "Save the pairs in the design map (default true when a project is known)",
            "type": "boolean"
          },
          "project_dir": {
            "description": "Your app's folder, where .dea/design-map.json lives; defaults to the current Dea project",
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "pages"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "figma_reader",
      "description": "Read a Figma design so you can build it for real in the user's project. Open the file in a Dea tab first (open_tab with its figma.com/design URL, show:false is fine; the account must be able to edit it: for a view-only file, ask the person to duplicate it to their drafts and use the copy's link). Without frame_id: the pages and their screens (a big file lists pages only; pass page to list one page's screens). With frame_id (like 1:13, or the URL's node-id 1-13): the screen's structure in reading order as JSX, each element named (Header, Form, TextField, PrimaryButton...) with Figma's exact values (box, auto layout, fonts per text part, colors, borders, radius, components, hidden states, icons as SVG files), plus the project's stack and how to build it. Build it in the project with its own components, routes and theme, run it on its dev server, then compare that running page to the frame and record it with design_map set. Never build standalone HTML copies. No Figma API token needed.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url": {
            "description": "Figma file URL; defaults to the current tab",
            "type": "string",
            "format": "uri"
          },
          "frame_id": {
            "description": "Frame id like 1:13 or URL node-id like 1-13",
            "type": "string"
          },
          "images": {
            "description": "Also save the frame as a PNG (2x)",
            "type": "boolean"
          },
          "dir": {
            "description": "Folder to save files in",
            "type": "string"
          },
          "names": {
            "description": "Name elements with Jev (default true)",
            "type": "boolean"
          },
          "project_dir": {
            "description": "The project to build into (default: the current Dea project)",
            "type": "string"
          },
          "page": {
            "description": "List only this page's screens (name or id); big files list pages only without it",
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "fill_form",
      "description": "Fill a whole form in ONE call: fields maps each field's visible label to its value, e.g. {\"Email\":\"a@b.co\",\"Country\":\"Kosovo\",\"I agree\":true,\"Plan\":\"Pro\"}. Text boxes are typed, <select>s pick the option by text or value, checkboxes take true/false, and a radio group (named by its fieldset legend or group label) takes the option's label. Labels match like a person reads them (case, trailing * and : ignored; \"Email\" finds \"Email address\" when only one field fits). Every label is found before anything is typed: if one misses or matches several fields, nothing is filled and the error lists the form's field names. Does not submit; click the submit button after. Use within to pick one form when a page has several. Fields can also be named by their name or id from the HTML (custname). Time, date and color fields take their value as text (20:30, 2026-05-31). Checkboxes sharing a name take a list: {\"topping\":[\"bacon\",\"onion\"]}.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "fields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "number"
                },
                {
                  "maxItems": 50,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "description": "Field label (or its name/id in the HTML) -> value. Several checkboxes sharing a name take a list of options"
          },
          "within": {
            "description": "CSS selector of the form or container, when the page has several",
            "type": "string",
            "minLength": 1
          },
          "clear": {
            "description": "Clear text fields first (default true)",
            "type": "boolean"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "fields"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "find_elements",
      "description": "Discover controls when you need to choose among them, troubleshoot, or obtain selectors. List visible interactive elements (links, buttons, inputs, selects) with CSS selectors, text, placeholders, names, and disabled state. Use the selectors with click, type_text, and wait_for. Returns up to `limit` (default 40) to keep the result small — narrow it with `contains` (only elements whose text/label/placeholder/name include this) and `tag` (e.g. only \"button\" or \"input\") instead of pulling the whole page; the result's `truncated`/`matched` tell you if more were filtered out.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "within": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object",
                "properties": {
                  "heading": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "heading"
                ],
                "additionalProperties": false
              }
            ]
          },
          "contains": {
            "description": "Only elements whose text, aria-label, placeholder, or name contains this (case-insensitive)",
            "type": "string"
          },
          "tag": {
            "description": "Only this tag: button (also matches role=button), a, input, textarea, select",
            "type": "string"
          },
          "limit": {
            "description": "Max elements to return (default 40, cap 150)",
            "type": "number"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "frame",
      "description": "Pause and seek a loaded HTML video, then return a PNG of the requested moment. at accepts seconds, mm:ss or hh:mm:ss.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number",
                "minimum": 0
              }
            ]
          },
          "selector": {
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "at"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_cookies",
      "description": "Read this tab's cookies, including HttpOnly login cookies that page scripts (execute_js) cannot see. By default the cookies sent to the tab's current page; pass url or domain for another site, name for one cookie, all:true for the tab's whole store. Use it to check which account the tab is signed in as, or to copy a login to set_cookies in another tab. A private tab has its own separate cookies.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url": {
            "description": "Cookies sent to this address; default the tab's page",
            "type": "string",
            "format": "uri"
          },
          "domain": {
            "description": "Cookies for this domain and its subdomains",
            "type": "string"
          },
          "name": {
            "description": "Only the cookie with this name",
            "type": "string"
          },
          "all": {
            "description": "Every cookie in this tab's store (up to 300)",
            "type": "boolean"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "get_events",
      "description": "Read buffered events the browser reported: console (console logs, with level), pageerror (uncaught JS errors), navigation, network (an XHR/Fetch response arrived, with its id and status), message (data a page sent via window.dea.send, source=page). Each event has a seq; pass since_seq to get only newer ones.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "kind": {
            "description": "console, pageerror, navigation, network, message",
            "type": "string"
          },
          "term": {
            "description": "Only events from this terminal id",
            "type": "string"
          },
          "source": {
            "description": "page or terminal",
            "type": "string"
          },
          "level": {
            "description": "For console: log, info, warn, error",
            "type": "string"
          },
          "url_contains": {
            "type": "string"
          },
          "text_contains": {
            "type": "string"
          },
          "since_seq": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "get_network",
      "description": "List captured network requests (most recent last), with filters. Use xhr_only for API/fetch calls, url_contains to match a path, method/status/failed to narrow. Rows are scoped to the active tab; pass all_tabs to see every tab's traffic. Each row carries durationMs (request start to load finished). Returns compact rows with an id; use get_request_details or get_response_body with that id, or get_network_bundle to pull rows and bodies together. Capture only runs for a tab once something has asked for it — this call itself is what turns it on for the active tab, like opening DevTools' Network panel. The first call on a tab returns a `note` saying capture just started and nothing before now was recorded; trigger the request AFTER that, then call again (or arm_network first to catch load traffic).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url_contains": {
            "type": "string"
          },
          "method": {
            "description": "GET, POST, etc.",
            "type": "string"
          },
          "type": {
            "description": "XHR, Fetch, Document, Script, Stylesheet, Image, Font, ...",
            "type": "string"
          },
          "xhr_only": {
            "description": "Only XHR and Fetch (API calls)",
            "type": "boolean"
          },
          "failed_only": {
            "type": "boolean"
          },
          "status_min": {
            "type": "number"
          },
          "status_max": {
            "type": "number"
          },
          "all_tabs": {
            "description": "Include requests from every tab, not just the active one",
            "type": "boolean"
          },
          "limit": {
            "description": "Max rows, default 50, cap 200",
            "type": "number"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "get_network_bundle",
      "description": "Pull matching requests and their response bodies in one call, so you don't fetch bodies one at a time. Same filters as get_network (active tab by default; pass all_tabs for every tab), plus each row carries durationMs, ttfbMs, and its initiator. JSON bodies are parsed and returned as objects; other text is truncated. Bodies are capped: max_bodies of them (default 20), each truncated to max_body_chars (default 4000), with a total-size budget on top — when it runs out, fewer full bodies come back and the result says how many were omitted. Set include_bodies to false for rows and timing only.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url_contains": {
            "type": "string"
          },
          "method": {
            "description": "GET, POST, etc.",
            "type": "string"
          },
          "type": {
            "description": "XHR, Fetch, Document, Script, Stylesheet, Image, Font, ...",
            "type": "string"
          },
          "xhr_only": {
            "description": "Only XHR and Fetch (API calls)",
            "type": "boolean"
          },
          "failed_only": {
            "type": "boolean"
          },
          "status_min": {
            "type": "number"
          },
          "status_max": {
            "type": "number"
          },
          "all_tabs": {
            "description": "Include requests from every tab, not just the active one",
            "type": "boolean"
          },
          "limit": {
            "description": "Max rows, default 50, cap 200",
            "type": "number"
          },
          "include_bodies": {
            "description": "Fetch response bodies (default true)",
            "type": "boolean"
          },
          "max_bodies": {
            "description": "Max bodies to fetch, default 20, cap 40",
            "type": "number"
          },
          "max_body_chars": {
            "description": "Truncate each body to this many chars, default 4000",
            "type": "number"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "get_page_text",
      "description": "Read existing page content or inform a decision. Read once and reuse across requested facts; absence from this page does not prove absence of a feature. Follow relevant specs, footnotes and support links for unresolved facts. Visible text of a page (truncated to 20000 chars; if truncated it tells you the offset to pass for the next slice). tab_id reads another tab without switching to it.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "offset": {
            "description": "Start character (for paging past a truncation)",
            "type": "number"
          },
          "tab_id": {
            "description": "Read this tab instead of the active one (from list_tabs)",
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "get_request_details",
      "description": "Full request and response headers, remote IP, and POST body for one captured request id (from get_network).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_response_body",
      "description": "Response body for one captured request id (from get_network). Text is truncated to 20000 chars; binary bodies are omitted.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_socket_messages",
      "description": "Read the messages of one WebSocket. Sockets appear in get_network as rows of type WebSocket with counts (filter with type:\"WebSocket\"); capture starts with the first get_network or arm_network call on the tab, so open or reload the page after that. Returns the newest matching messages with direction (sent or received) and a running number n; pass after:<last_n> to read only what arrived since. Binary messages are base64.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The WebSocket's id from get_network"
          },
          "direction": {
            "type": "string",
            "enum": [
              "sent",
              "received"
            ]
          },
          "contains": {
            "description": "Only messages containing this text",
            "type": "string"
          },
          "after": {
            "description": "Only messages numbered above this (last_n from an earlier call)",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "limit": {
            "description": "Most messages returned, default 50",
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "max_chars": {
            "description": "Most characters per message, default 2000",
            "type": "integer",
            "minimum": 1,
            "maximum": 20000
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_state",
      "description": "Current URL, page title, device, orientation, and viewport size.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "get_styles",
      "description": "Read one element's computed design properties as a curated, grouped bundle: box (position and size, display, position, box-sizing, z-index), typography (font family, size, weight, line-height, letter-spacing, alignment, transform, style, color), background (color, image, and the effective background behind a transparent element), spacing (margins, paddings, gap), border (per-side width/style/color collapsed when uniform, plus radius), effects (box-shadow, opacity, filter, backdrop-filter, transform), and layout (flex/grid direction, alignment, gap, grid templates). Browser-default and empty values are dropped to keep it small; pixel values are rounded. selector is a CSS selector or a read_page ref (\"12\"/\"@12\"). Pass props to also return named computed properties verbatim. Pair it across two builds to see exactly how one element's styling differs.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector, or a read_page ref like \"12\" / \"@12\""
          },
          "props": {
            "description": "Extra computed CSS property names to return verbatim, e.g. [\"cursor\", \"outline\"]",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "selector"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "hover",
      "description": "Move the cursor over an element to reveal hover-only UI (the ... menus, reaction pickers, and quick actions that appear on hover). Follow with find_elements or click once the hidden controls show.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "selector"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "inspect",
      "description": "Get the ground truth about one element so you stop guessing: its tag, role, every attribute, its real value, whether it is disabled (a disabled Save/Share button is why a click seems to do nothing), whether something is painted over it (coveredByOverlay / topmostAtCenter, why a click misses), its box, and the nearest genuinely-clickable ancestor (click that, not a text span inside it). Use it to check a field actually holds your text, or why a button is not responding.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "selector"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_devices",
      "description": "List device presets (responsive, iphone-15, iphone-pro-max, pixel-8, ipad-air, desktop) and which one the ACTIVE tab is on. Devices are per tab.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "list_tabs",
      "description": "List the browser tabs: id, title, url, which one is active, and which one is bound to your terminal.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "list_watches",
      "description": "List active watch_page watches: id, url, selector, how often, last check time, how many changes fired, and any error (e.g. a selector that stopped matching).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "list_workspaces",
      "description": "List every workspace (profile, project, name, id, open) for binding. Each profile has its own logins.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "navigate",
      "description": "Load a URL in the active tab and wait for load. When opening a new tab, pass its URL to open_tab instead of navigating twice.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "notify",
      "description": "Show a desktop notification to the person. Use it when you finish their task or produce a final answer after a long run, with a one-line summary. Skipped (shown:false) while they are already looking at the window.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "One line, e.g. Done: signed in and captured 3 screenshots"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "open_tab",
      "description": "Open a new browser tab and make it your selected tab (later tools act on it). It is shown on the user's screen, so they can watch; pass show:false to work in the background. Without url it opens the welcome page. Pass private:true for an incognito tab: a non-persistent session with no cookies, storage, or history saved or carried in, cleared when the tab closes. Pass fresh:true for a FRESH IDENTITY — implies private, and additionally rerolls the hardware/GPU fingerprint (platform, CPU core count, WebGL vendor/renderer string, languages, timezone) to one consistent, ordinary-machine profile instead of Electron's own signature, so a site fingerprinting across visits (repeated captchas, immediate blocks, 'try again later' on a plain private tab) cannot link this visit to any earlier one. Use it when a site keeps flagging you as the same suspicious browser even after private:true and a page reload. private and fresh combine.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "name": {
            "description": "Unique name in this workspace, e.g. intake-phone",
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "private": {
            "description": "Incognito: isolated, non-persistent session, nothing saved",
            "type": "boolean"
          },
          "fresh": {
            "description": "Fresh identity: implies private, plus a rerolled hardware/GPU fingerprint",
            "type": "boolean"
          },
          "show": {
            "description": "Default true: put the tab on the user's screen. false keeps it in the background.",
            "type": "boolean"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "paste_text",
      "description": "Paste text into a field instead of typing it, by running the browser's real Paste command (a trusted paste event carrying the clipboard). Use this for rich editors that ignore typed characters — Instagram's post caption is the classic case: type_text looks right but the caption saves blank, because the editor only commits text it receives via a real paste. Try paste_text when a typed value doesn't stick.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector, or a read_page ref like \"12\" / \"@12\""
          },
          "text": {
            "type": "string"
          },
          "clear": {
            "description": "Clear the field first (default true)",
            "type": "boolean"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "selector",
          "text"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "pause_for_human",
      "description": "Hand control to the person: shows an attention banner in the app window with your reason and blocks until they click Continue (or Cancel). Use for a login, a 2FA code, or a payment (they need the person's own credentials), or a step you genuinely cannot do. For a captcha, TRY it yourself first (click the checkbox, or read and click an image grid) and only pause if it will not pass. Returns {resumed:true} after they continue, {cancelled:true}, or {timedOut:true}. Default timeout 5 min, max 15 min.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "reason": {
            "description": "What you need the person to do, shown in the banner",
            "type": "string"
          },
          "timeout_ms": {
            "type": "number"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "press_key",
      "description": "Press one keyboard key. Keys: Enter, Tab, Escape, Backspace, Delete, arrow keys, PageUp/PageDown, Home, End. Use Enter to submit a focused form field. Hold modifiers for a shortcut: key=\"Enter\" with modifiers=[\"ctrl\"] (or [\"cmd\"]) sends Ctrl/Cmd+Enter, which posts/sends in Meta composers (Instagram post caption, comments, DMs) through the page's own handler — try this when clicking Share/Done doesn't fire the save.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "Enter",
              "Tab",
              "Escape",
              "Backspace",
              "Delete",
              "ArrowUp",
              "ArrowDown",
              "ArrowLeft",
              "ArrowRight",
              "PageUp",
              "PageDown",
              "Home",
              "End"
            ]
          },
          "modifiers": {
            "description": "Held modifier keys: ctrl, cmd, alt, shift",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "key"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "read_page",
      "description": "Read the whole page as an indented accessibility outline: headings, landmarks, text, and every visible interactive element tagged with a numeric ref like [3], plus its state (disabled, checked, focused, value, href). Cheaper and more stable than find_elements for understanding a full page: one call shows the structure and everything you can act on. Refs stay valid until the next read_page or a navigation. To act on [n], pass the number as a string (e.g. \"12\" or \"@12\") directly to click, type_text, inspect, etc.; no ref_selector call is needed.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "ref_selector",
      "description": "Only needed when you require a CSS string: selector tools already accept refs directly. Turn a numeric ref from the last read_page outline (the [n] markers) into a unique CSS selector for click, type_text, inspect, and the other selector tools. Errors if the ref is unknown or stale (after a navigation or a DOM change, call read_page again).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "ref": {
            "type": "number",
            "description": "The [n] number from the last read_page outline"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "ref"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "replay_request",
      "description": "Send a request with this tab's logins and read the answer: either a captured request again (id from get_network) with parts changed, or a new one (url). Use it to retry a failed API call, try one changed value, or check what another value returns, instead of rebuilding the request with execute_js. Captured method, headers and body are reused unless you pass your own; headers merge by name and null removes one. The tab's cookies are sent unless you pass a Cookie header. A redirect is returned, not followed, unless follow_redirects is true. It is a real request: one that changes or deletes data really does. Returns status, headers and body (text truncated to max_chars).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "description": "A captured request id from get_network",
            "type": "string"
          },
          "url": {
            "description": "Address to request; overrides the captured one",
            "type": "string",
            "format": "uri"
          },
          "method": {
            "description": "GET, POST, ...; defaults to the captured method or GET",
            "type": "string"
          },
          "headers": {
            "description": "Headers to add or change; null removes a captured header",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "body": {
            "description": "Request body; defaults to the captured body",
            "type": "string"
          },
          "follow_redirects": {
            "type": "boolean"
          },
          "timeout_ms": {
            "description": "Default 30000",
            "type": "integer",
            "minimum": 1000,
            "maximum": 120000
          },
          "max_chars": {
            "description": "Most body characters returned, default 20000",
            "type": "integer",
            "minimum": 1,
            "maximum": 200000
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "screenshot",
      "description": "Capture the page viewport as a PNG image. Pass name to also save it to disk (default folder ~/Documents/Dea/Screenshots/<date>/, override with dir); the result then includes the absolute saved path. full_page captures the whole scrollable page.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "name": {
            "description": "Save to disk as <name>.png and return the path",
            "type": "string"
          },
          "dir": {
            "description": "Folder to save into (default ~/Documents/Dea/Screenshots/<date>/)",
            "type": "string"
          },
          "full_page": {
            "description": "Capture the entire page height, not just the viewport",
            "type": "boolean"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "scroll",
      "description": "Scroll the page. Pass a selector to scroll an element into view, or pixels to scroll down by that amount (negative scrolls up).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string"
          },
          "pixels": {
            "type": "number"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "search_network",
      "description": "Find text anywhere in what this tab's site sent and received: addresses, headers, request bodies, response bodies and WebSocket messages, newest first. Use it to find which request carries a value you see on the page (an id, an email, a price, a token), instead of opening responses one by one. Plain text matches in any letter case; regex:true takes a regular expression. Each match gives the request id, where it was found and the text around it. Capture must already be running on the tab (it starts with the first get_network, arm_network or search_network call).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "Text to look for"
          },
          "regex": {
            "description": "Treat query as a regular expression",
            "type": "boolean"
          },
          "in": {
            "description": "Where to look; default everywhere",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "url",
                "request_headers",
                "request_body",
                "response_headers",
                "response_body",
                "socket"
              ]
            }
          },
          "url_contains": {
            "description": "Only requests whose address contains this",
            "type": "string"
          },
          "all_tabs": {
            "description": "Search every tab, not just this one",
            "type": "boolean"
          },
          "limit": {
            "description": "Most matches returned, default 30",
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "max_bodies": {
            "description": "Most response bodies read, default 300; 0 skips bodies",
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "select_option",
      "description": "Choose a value in a native <select> dropdown by option value or visible label. Fires the change event so frameworks register it.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string",
            "description": "The <select> element"
          },
          "value": {
            "type": "string",
            "description": "The option's value or visible text"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "selector",
          "value"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "select_tab",
      "description": "Make an existing tab (from list_tabs) your selected tab, so later tools act on it. It is shown on the user's screen; pass show:false to switch only your own selection.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tab_id": {
            "type": "string"
          },
          "show": {
            "description": "Default true: put the tab on the user's screen. false switches only your own selection.",
            "type": "boolean"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "tab_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "set_cookies",
      "description": "Set, change or remove cookies in this tab's store. cookies is a list of {name, value}; a null value removes that cookie. Each applies to the tab's current site unless it carries url or domain. Optional per cookie: path, secure, httpOnly, sameSite (Lax, Strict, None), expires (a date or Unix time; omit for a session cookie; the browser keeps a cookie 400 days at most). Other tabs in the same profile share the store; a private tab's cookies stay in that tab. Reload the page for the site to react. Removing a login cookie signs that site out for the whole profile.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cookies": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "null removes the cookie"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "domain": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "secure": {
                  "type": "boolean"
                },
                "httpOnly": {
                  "type": "boolean"
                },
                "sameSite": {
                  "type": "string"
                },
                "expires": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ]
                }
              },
              "required": [
                "name",
                "value"
              ],
              "additionalProperties": false
            }
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "cookies"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "set_device",
      "description": "Switch the ACTIVE TAB's emulated device and reload its page. Per tab: other tabs and future tabs are untouched. A fixed preset emulates the real device (its viewport, DPR, touch, and user agent, so sites serve their real mobile experience); 'responsive' returns the tab to following the window.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "device_id": {
            "type": "string",
            "description": "Preset id from list_devices: responsive | iphone-15 | iphone-pro-max | pixel-8 | ipad-air | desktop"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "device_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "set_emulation",
      "description": "Override this tab's timezone, Intl locale and optional test geolocation. Other tabs are unchanged.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "timezone": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "geolocation": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number",
                "minimum": -90,
                "maximum": 90
              },
              "lng": {
                "type": "number",
                "minimum": -180,
                "maximum": 180
              },
              "accuracy": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "lat",
              "lng"
            ],
            "additionalProperties": false
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "set_headers",
      "description": "Add request headers to everything this tab sends from now on (page loads, scripts, API calls): a staging auth header, a feature flag, or the header a security program asks testers to send. headers is {Name: \"value\"}; null removes one. host limits them to one site and its subdomains (recommended, so third-party hosts never see them). clear removes all first. Call with no arguments to list the tab's headers. They last until removed or the tab closes; other tabs are unchanged. User-Agent and client hints belong to set_device.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "headers": {
            "description": "Header names and values; null removes that header",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "host": {
            "description": "Only send to this hostname and its subdomains, e.g. example.com",
            "type": "string"
          },
          "clear": {
            "description": "Remove this tab's headers before applying",
            "type": "boolean"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "set_orientation",
      "description": "Set orientation for the active tab (per tab): landscape=true or portrait (landscape=false).",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "landscape": {
            "type": "boolean"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "landscape"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "set_split_view",
      "description": "Tile two named tabs in this workspace while preserving each viewport. Pass tabs:[] to restore one pane. A hidden workspace is not brought to the front.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tabs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "tabs"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "set_viewport",
      "description": "Pin the page to a viewport size instead of letting it follow the window — use this to test a layout at a known width rather than resizing the window by hand. preset: mobile (390x844), tablet (820x1180), laptop (1280x800), desktop (1440x900), wide (1920x1080), or responsive to unpin and track the window again. Or pass width (and optionally height) for a custom size. A viewport larger than the window renders scaled down to fit, but the page still lays out at the full pinned width, so CSS breakpoints and screenshots are true to that size. A pinned width below 768px is served the phone identity (mobile user agent and client hints), at or above it the desktop one; pinning across that line reloads the page once. Responsive (following the window) is always desktop. This applies to the active tab only — each tab keeps its own viewport, so different tabs can be different sizes. Returns the applied viewport, the identity, and the display scale.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "preset": {
            "description": "Named size, or 'responsive' to unpin and follow the window",
            "type": "string",
            "enum": [
              "mobile",
              "tablet",
              "laptop",
              "desktop",
              "wide",
              "responsive"
            ]
          },
          "width": {
            "description": "Custom CSS width in px (240-3840)",
            "type": "number"
          },
          "height": {
            "description": "Custom CSS height in px (320-2400), defaults to the stage height",
            "type": "number"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "stop_watch",
      "description": "Stop a watch_page watch and close its background tab.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The id watch_page returned"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "table_batch",
      "description": "One-call visible table to form transfer. Run before once (e.g. Start then navigate to data), extract rendered HTML table cells, validate every record, run after_read once (e.g. navigate back), then steps per row. Final read runs once. Uses the normal input/batch checks; stops on failure. No hidden data or automatic decisions. {{field}} placeholders allowed only in type_text/paste_text text. Counts setup, extraction and row steps toward 200 maximum. Returns phase timings and final read.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "before": {
            "description": "One-time setup steps before rows or times, e.g. click Start. Literal arguments; no placeholders or terminal reads. Counts toward 200 actions. Entire batch validated first; setup failure always stops.",
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "enum": [
                    "navigate",
                    "click",
                    "type_text",
                    "paste_text",
                    "press_key",
                    "blur",
                    "hover",
                    "select_option",
                    "fill_form",
                    "upload_file",
                    "scroll",
                    "wait_for",
                    "get_state",
                    "sleep",
                    "get_page_text",
                    "inspect",
                    "read_page"
                  ]
                },
                "args": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "tool"
              ],
              "additionalProperties": false
            }
          },
          "source": {
            "type": "object",
            "properties": {
              "selector": {
                "type": "string",
                "minLength": 1,
                "description": "CSS selector matching exactly one rendered HTML table"
              },
              "row_selector": {
                "description": "Relative data-row selector, default tbody > tr; exclude headers",
                "type": "string",
                "minLength": 1
              },
              "columns": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
                },
                "additionalProperties": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100
                },
                "description": "Map field names to 1-based cell positions, e.g. {first:1,email:3}; preserves rendered strings"
              },
              "expected_rows": {
                "type": "integer",
                "minimum": 1,
                "maximum": 25,
                "description": "Required exact count; reject incomplete/extra data before filling"
              }
            },
            "required": [
              "selector",
              "columns",
              "expected_rows"
            ],
            "additionalProperties": false
          },
          "after_read": {
            "description": "One-time setup steps before rows or times, e.g. click Start. Literal arguments; no placeholders or terminal reads. Counts toward 200 actions. Entire batch validated first; setup failure always stops.",
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "enum": [
                    "navigate",
                    "click",
                    "type_text",
                    "paste_text",
                    "press_key",
                    "blur",
                    "hover",
                    "select_option",
                    "fill_form",
                    "upload_file",
                    "scroll",
                    "wait_for",
                    "get_state",
                    "sleep",
                    "get_page_text",
                    "inspect",
                    "read_page"
                  ]
                },
                "args": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "tool"
              ],
              "additionalProperties": false
            }
          },
          "steps": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "enum": [
                    "navigate",
                    "click",
                    "type_text",
                    "paste_text",
                    "press_key",
                    "blur",
                    "hover",
                    "select_option",
                    "fill_form",
                    "upload_file",
                    "scroll",
                    "wait_for",
                    "get_state",
                    "sleep",
                    "get_page_text",
                    "inspect",
                    "read_page"
                  ]
                },
                "args": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "tool"
              ],
              "additionalProperties": false
            },
            "description": "Steps run in order, e.g. [{tool:'scroll',args:{pixels:800}},{tool:'sleep',args:{ms:400}}]"
          },
          "wait_for": {
            "description": "Final read completion condition, captured before the last click/navigation/Enter. For SPA filtering use {selector: observed results container, changed:true}; an existing selector alone is insufficient.",
            "type": "object",
            "properties": {
              "selector": {
                "type": "string",
                "minLength": 1
              },
              "text": {
                "type": "string",
                "minLength": 1
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "changed": {
                "type": "boolean",
                "const": true
              },
              "timeout_ms": {
                "type": "integer",
                "minimum": 1,
                "maximum": 15000
              }
            },
            "additionalProperties": false
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "source",
          "steps"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "tour",
      "description": "Guide through explicit targets with captions. Native overlay survives navigation; clicks use trusted input. On production Save/Publish/Submit/toggles are pointed at only. dry_run points without clicks; optional export_dir writes screenshots and a Markdown tour.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "steps": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "target": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string"
                        },
                        "within": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "heading": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "heading"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "text"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "caption": {
                  "type": "string",
                  "maxLength": 2000
                },
                "label": {
                  "type": "string",
                  "maxLength": 200
                },
                "hold_ms": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000
                },
                "click": {
                  "type": "boolean"
                }
              },
              "required": [
                "target"
              ],
              "additionalProperties": false
            }
          },
          "dry_run": {
            "type": "boolean"
          },
          "export_dir": {
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "steps"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "type_text",
      "description": "Fill using exactly one of selector or label. label matches an exact visible associated label or accessible name, freshly on every call and batch row. Use within (CSS container) to disambiguate duplicate labels. Stops on missing, ambiguous or stale targets. Clicks first, clears unless clear=false, and uses native input. Label targeting supports text inputs, textareas and contenteditable in the main document.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "description": "CSS selector, or read_page ref; mutually exclusive with label",
            "type": "string",
            "minLength": 1
          },
          "label": {
            "description": "Exact field label/accessibility name, whitespace normalized; resolved anew each fill",
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "within": {
            "description": "Optional unique visible CSS container for label targeting",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "text": {
            "type": "string"
          },
          "clear": {
            "description": "Clear the field first (default true)",
            "type": "boolean"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "text"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "upload_file",
      "description": "Attach a local file to a file upload WITHOUT the OS file picker (for uploading a photo in a chat, a profile picture, etc.; do not try to set a file input with execute_js, it cannot work). Best: pass the selector of the <input type=file> itself (find it with execute_js, e.g. document.querySelector(\"input[type=file]\"); it is often hidden) and Dea sets the file directly. If you only have the upload button, pass that and Dea clicks it and fills the dialog it opens.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string",
            "description": "The <input type=file> (preferred, often hidden), or the button that opens the picker"
          },
          "path": {
            "type": "string",
            "description": "Absolute path to the local file to upload"
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "selector",
          "path"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "video_transcript",
      "description": "Read timestamped captions from a loaded video. Uses existing text tracks first; Loom/YouTube extraction can use a locally installed yt-dlp with this tab's cookies. Reports missing captions explicitly; does not invent speech transcription.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "wait_for",
      "description": "Wait until the element matching the CSS selector reaches a state (default 10s, max 30s). state: attached (exists, default), visible (a match is actually shown, so hidden leftover dialogs don't count), hidden (no match is shown: a modal closed, a spinner went away), detached (removed from the page). Returns found=false on timeout.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "selector": {
            "type": "string"
          },
          "timeout_ms": {
            "type": "number"
          },
          "state": {
            "type": "string",
            "enum": [
              "attached",
              "visible",
              "hidden",
              "detached"
            ]
          },
          "frame": {
            "description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
            "type": "string",
            "minLength": 1
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "selector"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "wait_for_event",
      "description": "Block until the browser reports a matching event, then return it (or timedOut=true). This is how the browser talks back: wait for a network response to a URL (kind=network, url_contains), a console error (kind=console, level=error), a navigation, a page message (kind=message). Default timeout 20s, max 120s. Pass since_seq (from get_events latest_seq) to also catch an event that already fired.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "term": {
            "description": "Only events from this terminal id",
            "type": "string"
          },
          "source": {
            "description": "page or terminal",
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "url_contains": {
            "type": "string"
          },
          "text_contains": {
            "type": "string"
          },
          "since_seq": {
            "type": "number"
          },
          "timeout_ms": {
            "type": "number"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "watch_page",
      "description": "Watch a page for a change instead of checking back yourself: polls url (reloading it) on its own hidden background tab — it never takes over what you're looking at — and compares the visible text (or, with selector, just that one element's text) against the last check. The moment it differs, a kind:\"watch\" event fires (park on it with wait_for_event or see it in get_events) and the human gets a desktop notification. Good for a restock, a price drop, a ticket going on sale, a new reply — anything where the honest move is 'tell me when it changes' rather than reloading in a loop yourself. interval_ms floors at 15000 (this polls, it doesn't scrape at speed) and defaults to 60000. Returns an id for list_watches/stop_watch. Max 10 concurrent watches.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "selector": {
            "description": "Watch just this element's text instead of the whole page",
            "type": "string"
          },
          "interval_ms": {
            "description": "Poll interval, floors at 15000, default 60000",
            "type": "number"
          },
          "notify": {
            "description": "Custom desktop-notification text on change (default: \"<url> changed\")",
            "type": "string"
          },
          "tab": {
            "description": "Tab name or id in your workspace; does not change the visible tab.",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      }
    }
  ]
}
