This commit is contained in:
ray zhou
2026-05-29 17:23:17 +08:00
parent f71a5c59af
commit 1bcb6120dd
139 changed files with 4229 additions and 523 deletions

View File

@@ -1,27 +1,19 @@
The cursor-ide-browser is an MCP server that allows you to navigate the web and interact with the page. Use this for frontend/webapp development and testing code changes.
The cursor-ide-browser MCP server provides a Cursor-owned browser tab plus a raw Chrome DevTools Protocol command tool.
CORE WORKFLOW:
1. Start by understanding the user's goal and what success looks like on the page.
2. Use browser_tabs with action "list" to inspect open tabs and URLs before acting.
3. Use browser_snapshot before any interaction to inspect the current page structure and obtain refs.
4. Use browser_take_screenshot for standalone visual verification or screenshot-based coordinate clicks. For browser_mouse_click_xy, capture a fresh viewport screenshot for the same tab and then issue the click immediately using coordinates from that screenshot. Do not reuse older screenshot coordinates. If any other browser tool runs first, capture a new viewport screenshot before calling browser_mouse_click_xy.
5. After any action that could change the page structure or URL (click, type, fill, fill_form, select, hover, press key, drag, browser_navigate, browser_navigate_back, wait, dialog response, or lazy-loaded scroll), take a fresh browser_snapshot before the next structural action unless you are certain the page did not change.
AGENTIC PAGE NAVIGATION:
1. When you know the destination, use browser_navigate directly to that URL.
2. Use browser_navigate_back for browser history. Keep track of the current URL from tool output or snapshot metadata so you can navigate directly when needed.
3. Work top-down: identify the relevant page region, dialog, form, or menu in the snapshot first, then target a specific ref inside it.
4. Prefer one deliberate action followed by verification over exploratory thrashing.
5. Use browser_search to locate text before blindly scrolling through large pages.
6. Use browser_hover to reveal tooltips, dropdown menus, or hidden content before interacting with revealed elements.
7. Use browser_scroll with scrollIntoView: true before clicking elements that may be offscreen or obscured.
8. Use browser_fill to replace existing content (works on both input fields and contenteditable elements) and browser_type to append text or trigger typing-related handlers.
9. If multiple elements share the same role and name, choose the exact ref from the snapshot instead of guessing. Use [nth=N] only as a hint to tell duplicate elements apart.
3. Use browser_navigate to create or navigate the target tab. Omit the position parameter for background automation so focus is preserved.
4. Use browser_lock before longer automation on an existing tab, then browser_lock with action "unlock" when finished.
5. Use browser_snapshot for accessibility context and browser_take_screenshot for visual verification.
6. Use browser_click, browser_type, browser_fill, browser_select_option, browser_press_key, browser_scroll, and browser_drag for page interactions.
7. Use browser_highlight and browser_get_bounding_box for visual grounding and coordinate diagnostics.
8. Use browser_cdp for page inspection, profiling, runtime evaluation, DOM/CSS queries, and performance data.
AVOID RABBIT HOLES:
1. Do not repeat the same failing action more than once without new evidence such as a fresh snapshot, a different ref, a changed page state, or a clear new hypothesis.
2. IMPORTANT: If four attempts fail or progress stalls, stop acting and report what you observed, what blocked progress, and the most likely next step.
3. Prefer gathering evidence over brute force. If the page is confusing, use browser_snapshot, browser_console_messages, browser_network_requests, or a screenshot to understand it before trying more actions.
3. Prefer gathering evidence over brute force. If the page is confusing, use browser_snapshot, browser_take_screenshot, or CDP inspection before trying more actions.
4. If you encounter a blocker such as login, passkey/manual user interaction, permissions, captchas, destructive confirmations, missing data, or an unexpected state, stop and report it instead of improvising repeated actions.
5. Do not get stuck in wait-action-wait loops. Every retry should be justified by something newly observed.
@@ -32,20 +24,23 @@ CRITICAL - Lock/unlock workflow:
4. Only call browser_lock with action: "unlock" when completely done with ALL browser operations for this turn
IMPORTANT - Waiting strategy:
When waiting for page changes (navigation, content loading, animations, etc.), prefer short incremental waits (1-3 seconds) with browser_snapshot checks in between rather than a single long wait. For example, instead of waiting 10 seconds, do: wait 2s -> snapshot -> check if ready -> if not, wait 2s more -> snapshot again. This allows you to proceed as soon as the page is ready rather than always waiting the maximum time.
When waiting for page changes, prefer short CDP polling loops with Runtime.evaluate, DOM queries, Page lifecycle signals, or browser_snapshot checks rather than a single long wait.
PERFORMANCE PROFILING:
- browser_profile_start/stop: CPU profiling with call stacks and timing data. Use to identify slow JavaScript functions.
- Profile data is written to ~/.cursor/browser-logs/. Files: cpu-profile-{timestamp}.json (raw profile in Chrome DevTools format) and cpu-profile-{timestamp}-summary.md (human-readable summary).
- IMPORTANT: When investigating performance issues, read the raw cpu-profile-*.json file to verify summary data. Key fields: profile.samples.length (total samples), profile.nodes[].hitCount (per-node hits), profile.nodes[].callFrame.functionName (function names). Cross-reference with the summary to confirm findings before making optimization recommendations.
CDP USAGE:
- Use browser_cdp with a DevTools Protocol method and params object, for example Runtime.evaluate, DOM.getDocument, CSS.getComputedStyleForNode, Profiler.start/stop, Performance.getMetrics, Log.enable, and Network.enable.
- Do not use browser_cdp with CDP Input.* methods. They are denied because they are focus-sensitive in Electron webviews and can route input to Cursor UI instead of the browser page.
- Use browser_click, browser_type, browser_fill, browser_select_option, browser_press_key, browser_scroll, and browser_drag for clicks, typing, filling inputs, selecting options, keyboard actions, scrolling, and drag-and-drop.
- Use Runtime.evaluate for advanced DOM-scoped interactions that the dedicated browser tools do not cover.
- For profiling, call Profiler.enable, Profiler.start, reproduce the behavior, then Profiler.stop. The profile is saved to a file and returned as a log_file; read that file only when you need to inspect details.
- For JavaScript evaluation, prefer Runtime.evaluate with returnByValue when possible.
- Some browser-wide or sensitive CDP methods are denied, especially cookie, storage, permission, download, target-management, filesystem-backed file-input commands, system-level commands, and CDP navigation/history navigation commands.
- Large CDP responses are saved to files instead of being inlined. Prefer using the returned file path over immediately stuffing large payloads into context; read focused sections only when needed.
VISION:
- Snapshot and interaction tools can optionally attach a page screenshot by setting take_screenshot_afterwards: true. The screenshot provides visual context (layout, colors, state); the aria snapshot provides element refs required for targeting actions. Use both together: the screenshot shows what the page looks like, the snapshot tells you how to interact with it. Prefer refs from the snapshot for interactions; the one screenshot-based exception is browser_mouse_click_xy, which must use coordinates from a fresh viewport screenshot captured immediately before the click for that tab. Any other browser tool call invalidates that screenshot cache.
- browser_take_screenshot attaches an image result that the model can inspect. CDP Page.captureScreenshot returns data inside JSON and should not replace browser_take_screenshot when visual verification is needed.
NOTES:
- browser_snapshot returns snapshot YAML and is the main source of truth for page structure.
- Refs are opaque handles tied to the latest browser_snapshot for that tab. If a ref stops working, take a fresh snapshot instead of guessing.
- Native dialogs (alert/confirm/prompt) never block automation. By default, confirm() returns true and prompt() returns the default value. To test different responses, call browser_handle_dialog BEFORE the triggering action: use accept: false for "Cancel", or promptText: "value" for custom prompt input.
- Refs are opaque handles tied to the latest browser_snapshot for that tab.
- Iframe content is not accessible - only elements outside iframes can be interacted with.
- For nested scroll containers, use browser_scroll with scrollIntoView: true before clicking elements that may be obscured.
- When you stop to report a blocker, include the current page, the target you were trying to reach, the blocker you observed, and the best next action. If the blocker requires manual user interaction, ask the user to take over at that point rather than assuming it in advance.

View File

@@ -0,0 +1,28 @@
{
"name": "browser_cdp",
"description": "Send a Chrome DevTools Protocol command to the target browser tab. Do not use CDP Input.* methods; use dedicated browser tools for clicks, text input, key presses, scrolling, and drag-and-drop. Browser-wide, storage, cookie, permission, download, target-management, and system-level commands are denied.",
"arguments": {
"type": "object",
"properties": {
"method": {
"type": "string",
"description": "CDP method name, for example Runtime.evaluate, DOM.getDocument, Profiler.start, or Performance.getMetrics."
},
"params": {
"type": "object",
"description": "CDP params object. Omit or pass {} when the command takes no params."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after the CDP command completes. Defaults to false."
}
},
"required": [
"method"
]
}
}

View File

@@ -1,20 +1,28 @@
{
"name": "browser_click",
"description": "Perform click on a web page. Supports single/double click, different mouse buttons, modifier keys, position offsets, and hold duration.",
"description": "Click an element by ref from browser_snapshot. Use this instead of CDP Input.* methods.",
"arguments": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Human-readable element description used to obtain permission to interact with the element"
},
"ref": {
"type": "string",
"description": "Exact target element reference from the page snapshot"
"description": "Element ref from browser_snapshot."
},
"element": {
"type": "string",
"description": "Human-readable description of the element."
},
"offsetX": {
"type": "number",
"description": "Optional x offset from the element center."
},
"offsetY": {
"type": "number",
"description": "Optional y offset from the element center."
},
"doubleClick": {
"type": "boolean",
"description": "Whether to perform a double click instead of a single click"
"description": "When true, double-click the element."
},
"button": {
"type": "string",
@@ -23,7 +31,7 @@
"right",
"middle"
],
"description": "Mouse button to click. Defaults to \"left\"."
"description": "Mouse button. Defaults to left."
},
"modifiers": {
"type": "array",
@@ -37,27 +45,22 @@
"ControlOrMeta"
]
},
"description": "Modifier keys to hold during click. \"ControlOrMeta\" uses Ctrl on Windows/Linux and Cmd on Mac."
},
"offsetX": {
"type": "number",
"description": "Horizontal offset from element's left edge in pixels. If omitted, clicks at horizontal center."
},
"offsetY": {
"type": "number",
"description": "Vertical offset from element's top edge in pixels. If omitted, clicks at vertical center."
"description": "Optional modifier keys."
},
"holdDurationMs": {
"type": "number",
"description": "Duration to hold the mouse button down before releasing, in milliseconds. Useful for long-press interactions. Defaults to 0 (immediate release)."
"description": "Optional mouse hold duration before release."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after the click completes. Defaults to false."
}
},
"required": [
"element",
"ref"
]
}

View File

@@ -1,14 +0,0 @@
{
"name": "browser_console_messages",
"description": "Returns all console messages",
"arguments": {
"type": "object",
"properties": {
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": []
}
}

View File

@@ -1,28 +1,32 @@
{
"name": "browser_drag",
"description": "Perform a drag and drop operation. Drags from a source element to a target element or coordinates.",
"description": "Drag an element by ref to another ref or viewport coordinates.",
"arguments": {
"type": "object",
"properties": {
"sourceRef": {
"type": "string",
"description": "Reference of the element to drag from"
"description": "Source element ref from browser_snapshot."
},
"targetRef": {
"type": "string",
"description": "Reference of the element to drop onto"
"description": "Optional target element ref from browser_snapshot."
},
"targetX": {
"type": "number",
"description": "X coordinate to drop at (relative to viewport). Use with targetY instead of targetRef for coordinate-based drops."
"description": "Optional target viewport x coordinate."
},
"targetY": {
"type": "number",
"description": "Y coordinate to drop at (relative to viewport). Use with targetX instead of targetRef for coordinate-based drops."
"description": "Optional target viewport y coordinate."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after drag completes. Defaults to false."
}
},
"required": [

View File

@@ -1,28 +1,31 @@
{
"name": "browser_fill",
"description": "Clear and fill a value into an input element. Unlike browser_type which appends text, this clears the existing value first and sets the new value atomically. Use this when you want to replace the entire content of an input field.",
"description": "Set the value of an input, textarea, or contenteditable element by ref.",
"arguments": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Human-readable element description used to obtain permission to interact with the element"
},
"ref": {
"type": "string",
"description": "Exact target element reference from the page snapshot"
"description": "Element ref from browser_snapshot."
},
"value": {
"type": "string",
"description": "Value to fill into the element (replaces any existing content)"
"description": "Value to set."
},
"element": {
"type": "string",
"description": "Human-readable description of the element."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after filling completes. Defaults to false."
}
},
"required": [
"element",
"ref",
"value"
]

View File

@@ -1,49 +0,0 @@
{
"name": "browser_fill_form",
"description": "Fill multiple form fields at once. Each field uses ref + value. By default, each field is cleared before setting the new value.",
"arguments": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Human-readable element description used to obtain permission to interact with the element"
},
"ref": {
"type": "string",
"description": "Exact target element reference from the page snapshot"
},
"value": {
"type": "string",
"description": "Value to fill into the field"
},
"clear": {
"type": "boolean",
"description": "Whether to clear existing content before filling. Defaults to true."
}
},
"required": [
"element",
"ref",
"value"
]
}
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after the fill completes. Defaults to false."
}
},
"required": [
"fields"
]
}
}

View File

@@ -1,16 +1,16 @@
{
"name": "browser_get_bounding_box",
"description": "Get bounding box details for an element.",
"description": "Get the viewport bounding box for an element ref.",
"arguments": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Human-readable element description used to obtain permission to inspect the element"
},
"ref": {
"type": "string",
"description": "Exact target element reference from the page snapshot"
"description": "Element ref from browser_snapshot."
},
"element": {
"type": "string",
"description": "Human-readable description of the element."
},
"viewId": {
"type": "string",
@@ -18,7 +18,6 @@
}
},
"required": [
"element",
"ref"
]
}

View File

@@ -1,24 +0,0 @@
{
"name": "browser_handle_dialog",
"description": "Configure how native browser dialogs (alert, confirm, prompt) are handled. Dialogs are non-blocking in this environment - they return immediately without showing a visible dialog. Use this tool BEFORE triggering an action that shows a dialog to configure what value it should return. Also returns recent dialog history.",
"arguments": {
"type": "object",
"properties": {
"accept": {
"type": "boolean",
"description": "For confirm() dialogs: true to simulate clicking OK (returns true), false to simulate clicking Cancel (returns false). Default behavior is true."
},
"promptText": {
"type": "string",
"description": "For prompt() dialogs: the text value to return. If not specified, prompt() returns the default value provided by the page."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"accept"
]
}
}

View File

@@ -1,16 +1,16 @@
{
"name": "browser_highlight",
"description": "Temporarily highlight an element for visual debugging.",
"description": "Highlight an element by ref in the browser page for visual grounding.",
"arguments": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Human-readable element description used to obtain permission to inspect the element"
},
"ref": {
"type": "string",
"description": "Exact target element reference from the page snapshot"
"description": "Element ref from browser_snapshot."
},
"element": {
"type": "string",
"description": "Human-readable description of the element."
},
"durationMs": {
"type": "number",
@@ -22,7 +22,6 @@
}
},
"required": [
"element",
"ref"
]
}

View File

@@ -1,25 +0,0 @@
{
"name": "browser_hover",
"description": "Hover over element on page",
"arguments": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Human-readable element description used to obtain permission to interact with the element"
},
"ref": {
"type": "string",
"description": "Exact target element reference from the page snapshot"
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"element",
"ref"
]
}
}

View File

@@ -1,16 +1,16 @@
{
"name": "browser_mouse_click_xy",
"description": "Click left, middle, or right mouse button using coordinates from a fresh viewport screenshot captured immediately before this call for the same tab. Do not reuse older screenshot coordinates. If any other browser tool runs first, this call will fail until you capture a new viewport screenshot.",
"description": "Click at viewport coordinates. Prefer browser_click with refs when possible.",
"arguments": {
"type": "object",
"properties": {
"x": {
"type": "number",
"description": "X coordinate from the fresh viewport screenshot captured immediately before this call for this tab, measured in screenshot pixels."
"description": "Viewport x coordinate."
},
"y": {
"type": "number",
"description": "Y coordinate from the fresh viewport screenshot captured immediately before this call for this tab, measured in screenshot pixels."
"description": "Viewport y coordinate."
},
"button": {
"type": "string",
@@ -19,11 +19,15 @@
"right",
"middle"
],
"description": "Mouse button to click. Defaults to \"left\"."
"description": "Mouse button. Defaults to left."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after the click completes. Defaults to false."
}
},
"required": [

View File

@@ -18,7 +18,7 @@
"active",
"side"
],
"description": "IMPORTANT: Set to \"side\" if user mentions \"side\", \"beside\", \"side panel\", or \"side by side\". Opens browser in side editor group. Defaults to \"active\" (current editor group)."
"description": "Only set when the user explicitly asks to reveal, show, focus, or open the browser visibly. Set to \"active\" for visible/revealed browser UI, or \"side\" if the user mentions \"side\", \"beside\", \"side panel\", or \"side by side\". Omit this parameter for background automation so focus is preserved."
},
"take_screenshot_afterwards": {
"type": "boolean",

View File

@@ -1,14 +0,0 @@
{
"name": "browser_navigate_back",
"description": "Go back to the previous page in browser history. Returns an error if there is no previous page to navigate to.",
"arguments": {
"type": "object",
"properties": {
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": []
}
}

View File

@@ -1,14 +0,0 @@
{
"name": "browser_network_requests",
"description": "Returns all network requests since loading the page",
"arguments": {
"type": "object",
"properties": {
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": []
}
}

View File

@@ -1,16 +1,20 @@
{
"name": "browser_press_key",
"description": "Press a key on the keyboard. Supports key combinations with modifiers using \"+\" syntax.",
"description": "Press a key in the browser page using DOM keyboard events.",
"arguments": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Key to press. Single keys: \"a\", \"Enter\", \"Escape\", \"Tab\", \"Backspace\", \"Delete\", \"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\", \"PageUp\", \"PageDown\", \"Home\", \"End\", \"F1\"-\"F12\", \"Space\". Key combinations with modifiers using \"+\": \"Control+s\", \"Ctrl+Shift+p\", \"Alt+Tab\", \"Meta+a\" (Cmd on Mac). Modifier aliases: Control/Ctrl, Shift, Alt/Option, Meta/Command/Cmd/Win."
"description": "Key to press, for example Enter, Escape, Tab, ArrowDown, or a single character."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after the key press completes. Defaults to false."
}
},
"required": [

View File

@@ -1,14 +0,0 @@
{
"name": "browser_profile_start",
"description": "Start CPU profiling to capture call stack timing data. Use browser_profile_stop to end profiling and get results.",
"arguments": {
"type": "object",
"properties": {
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": []
}
}

View File

@@ -1,14 +0,0 @@
{
"name": "browser_profile_stop",
"description": "Stop CPU profiling and return the profile data including call stacks, timing, and samples.",
"arguments": {
"type": "object",
"properties": {
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": []
}
}

View File

@@ -1,25 +0,0 @@
{
"name": "browser_resize",
"description": "Resize the browser window",
"arguments": {
"type": "object",
"properties": {
"width": {
"type": "number",
"description": "Width of the browser window"
},
"height": {
"type": "number",
"description": "Height of the browser window"
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"width",
"height"
]
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "browser_scroll",
"description": "Scroll the page or a specific element. Use this to bring elements into view, scroll to content, or navigate long pages. Can scroll in any direction by specifying delta values or using directional shortcuts.",
"description": "Scroll the page, a scrollable container, or an element into view. Use this instead of CDP Input.* wheel events.",
"arguments": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "Element reference to scroll into view, or to scroll within (for scrollable containers)"
"description": "Optional element ref from browser_snapshot."
},
"direction": {
"type": "string",
@@ -16,27 +16,31 @@
"left",
"right"
],
"description": "Direction to scroll. Shorthand for setting deltaX/deltaY."
"description": "Scroll direction."
},
"amount": {
"type": "number",
"description": "Amount to scroll in pixels when using direction. Defaults to 300."
"description": "Scroll amount in pixels. Defaults to 300."
},
"deltaX": {
"type": "number",
"description": "Horizontal scroll amount in pixels. Positive scrolls right, negative scrolls left."
"description": "Explicit horizontal scroll delta."
},
"deltaY": {
"type": "number",
"description": "Vertical scroll amount in pixels. Positive scrolls down, negative scrolls up."
"description": "Explicit vertical scroll delta."
},
"scrollIntoView": {
"type": "boolean",
"description": "If true and ref is provided, scrolls the element into view instead of scrolling within it. Defaults to true when ref is provided without delta values."
"description": "When true, scroll the ref into view."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after scrolling completes. Defaults to false."
}
},
"required": []

View File

@@ -1,30 +0,0 @@
{
"name": "browser_search",
"description": "Search for text on the current page, similar to Cmd+F / Ctrl+F. Highlights all matches, scrolls to the first match, and returns a screenshot showing the match in context along with the count and positions of matches found.",
"arguments": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The text to search for on the page"
},
"caseSensitive": {
"type": "boolean",
"description": "Whether the search should be case-sensitive. Defaults to false."
},
"navigateToMatch": {
"type": "number",
"description": "Navigate to a specific match by index (0-based). If not provided, navigates to the first match."
},
"clearHighlights": {
"type": "boolean",
"description": "If true, clears all search highlights without performing a new search. Use this to remove previous search highlights."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": []
}
}

View File

@@ -1,31 +1,34 @@
{
"name": "browser_select_option",
"description": "Select an option in a dropdown. Matching priority: exact value match, then exact label match, then partial label match. The snapshot now shows available options for select elements.",
"description": "Select one or more options in a select element by ref.",
"arguments": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Human-readable element description used to obtain permission to interact with the element"
},
"ref": {
"type": "string",
"description": "Exact target element reference from the page snapshot"
"description": "Element ref from browser_snapshot."
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of values to select. Matches against option value first, then label text, then partial label. Use exact values from the snapshot options list when available."
"description": "Option values or labels to select."
},
"element": {
"type": "string",
"description": "Human-readable description of the element."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after selection completes. Defaults to false."
}
},
"required": [
"element",
"ref",
"values"
]

View File

@@ -24,7 +24,7 @@
"active",
"side"
],
"description": "IMPORTANT: Set to \"side\" if user mentions \"side\", \"beside\", \"side panel\", or \"side by side\". Opens browser in side editor group. Only for action \"new\". Defaults to \"active\"."
"description": "Only set for action \"new\" when the user explicitly asks to reveal, show, focus, or open the browser visibly. Set to \"active\" for visible/revealed browser UI, or \"side\" if the user mentions \"side\", \"beside\", \"side panel\", or \"side by side\". Omit this parameter for background automation so focus is preserved."
}
},
"required": [

View File

@@ -1,40 +1,43 @@
{
"name": "browser_type",
"description": "Type text into editable element",
"description": "Type text into an input, textarea, or contenteditable element by ref.",
"arguments": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Human-readable element description used to obtain permission to interact with the element"
},
"ref": {
"type": "string",
"description": "Exact target element reference from the page snapshot"
"description": "Element ref from browser_snapshot."
},
"text": {
"type": "string",
"description": "Text to type into the element"
"description": "Text to type."
},
"element": {
"type": "string",
"description": "Human-readable description of the element."
},
"clear": {
"type": "boolean",
"description": "Whether to clear existing content before typing. Use this to replace the current value instead of appending to it. Defaults to false."
"description": "When true, clear existing text first."
},
"submit": {
"type": "boolean",
"description": "Whether to submit entered text (press Enter after)"
"description": "When true, press Enter after typing."
},
"slowly": {
"type": "boolean",
"description": "Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once."
"description": "When true, type character by character."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after typing completes. Defaults to false."
}
},
"required": [
"element",
"ref",
"text"
]

View File

@@ -1,30 +0,0 @@
{
"name": "browser_wait_for",
"description": "Wait for text to appear or disappear, or wait a specified time. Note: time is in SECONDS, not milliseconds.",
"arguments": {
"type": "object",
"properties": {
"time": {
"type": "number",
"description": "Time to wait in SECONDS (e.g., 2 for 2 seconds, 0.5 for 500ms). Use for fixed delays."
},
"text": {
"type": "string",
"description": "Wait for this text to appear on the page."
},
"textGone": {
"type": "string",
"description": "Wait for this text to disappear from the page."
},
"timeout": {
"type": "number",
"description": "Maximum time to wait for text conditions in MILLISECONDS. Defaults to 30000 (30 seconds)."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": []
}
}