This commit is contained in:
ray zhou
2026-05-29 11:21:40 +08:00
parent 5d6d482efe
commit f71a5c59af
447 changed files with 32245 additions and 116 deletions

View File

@@ -0,0 +1,64 @@
{
"name": "browser_click",
"description": "Perform click on a web page. Supports single/double click, different mouse buttons, modifier keys, position offsets, and hold duration.",
"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"
},
"doubleClick": {
"type": "boolean",
"description": "Whether to perform a double click instead of a single click"
},
"button": {
"type": "string",
"enum": [
"left",
"right",
"middle"
],
"description": "Mouse button to click. Defaults to \"left\"."
},
"modifiers": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Control",
"Shift",
"Alt",
"Meta",
"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."
},
"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)."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"element",
"ref"
]
}
}

View File

@@ -0,0 +1,14 @@
{
"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

@@ -0,0 +1,32 @@
{
"name": "browser_drag",
"description": "Perform a drag and drop operation. Drags from a source element to a target element or coordinates.",
"arguments": {
"type": "object",
"properties": {
"sourceRef": {
"type": "string",
"description": "Reference of the element to drag from"
},
"targetRef": {
"type": "string",
"description": "Reference of the element to drop onto"
},
"targetX": {
"type": "number",
"description": "X coordinate to drop at (relative to viewport). Use with targetY instead of targetRef for coordinate-based drops."
},
"targetY": {
"type": "number",
"description": "Y coordinate to drop at (relative to viewport). Use with targetX instead of targetRef for coordinate-based drops."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"sourceRef"
]
}
}

View File

@@ -0,0 +1,30 @@
{
"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.",
"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"
},
"value": {
"type": "string",
"description": "Value to fill into the element (replaces any existing content)"
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"element",
"ref",
"value"
]
}
}

View File

@@ -0,0 +1,49 @@
{
"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

@@ -0,0 +1,25 @@
{
"name": "browser_get_bounding_box",
"description": "Get bounding box details for an element.",
"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"
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"element",
"ref"
]
}
}

View File

@@ -0,0 +1,24 @@
{
"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

@@ -0,0 +1,29 @@
{
"name": "browser_highlight",
"description": "Temporarily highlight an element for visual debugging.",
"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"
},
"durationMs": {
"type": "number",
"description": "Highlight duration in milliseconds. Defaults to 2000."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"element",
"ref"
]
}
}

View File

@@ -0,0 +1,25 @@
{
"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

@@ -0,0 +1,24 @@
{
"name": "browser_lock",
"description": "Lock or unlock the browser to control whether the user can interact while you work. Set action to \"lock\" or \"unlock\". When locked, the user can still click \"Take Control\" to unlock if needed.",
"arguments": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"lock",
"unlock"
],
"description": "Whether to lock or unlock the browser for user interaction."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"action"
]
}
}

View File

@@ -0,0 +1,34 @@
{
"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.",
"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."
},
"y": {
"type": "number",
"description": "Y coordinate from the fresh viewport screenshot captured immediately before this call for this tab, measured in screenshot pixels."
},
"button": {
"type": "string",
"enum": [
"left",
"right",
"middle"
],
"description": "Mouse button to click. Defaults to \"left\"."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"x",
"y"
]
}
}

View File

@@ -0,0 +1,36 @@
{
"name": "browser_navigate",
"description": "Navigate to a URL. By default reuses an existing tab; set newTab: true to open in a new tab.",
"arguments": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to navigate to"
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"position": {
"type": "string",
"enum": [
"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)."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after navigation completes. Defaults to false."
},
"newTab": {
"type": "boolean",
"description": "When true, creates a new tab before navigating instead of reusing an existing tab. Defaults to false."
}
},
"required": [
"url"
]
}
}

View File

@@ -0,0 +1,14 @@
{
"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

@@ -0,0 +1,14 @@
{
"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

@@ -0,0 +1,20 @@
{
"name": "browser_press_key",
"description": "Press a key on the keyboard. Supports key combinations with modifiers using \"+\" syntax.",
"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."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"key"
]
}
}

View File

@@ -0,0 +1,14 @@
{
"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

@@ -0,0 +1,14 @@
{
"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

@@ -0,0 +1,25 @@
{
"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

@@ -0,0 +1,44 @@
{
"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.",
"arguments": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "Element reference to scroll into view, or to scroll within (for scrollable containers)"
},
"direction": {
"type": "string",
"enum": [
"up",
"down",
"left",
"right"
],
"description": "Direction to scroll. Shorthand for setting deltaX/deltaY."
},
"amount": {
"type": "number",
"description": "Amount to scroll in pixels when using direction. Defaults to 300."
},
"deltaX": {
"type": "number",
"description": "Horizontal scroll amount in pixels. Positive scrolls right, negative scrolls left."
},
"deltaY": {
"type": "number",
"description": "Vertical scroll amount in pixels. Positive scrolls down, negative scrolls up."
},
"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."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": []
}
}

View File

@@ -0,0 +1,30 @@
{
"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

@@ -0,0 +1,33 @@
{
"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.",
"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"
},
"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."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"element",
"ref",
"values"
]
}
}

View File

@@ -0,0 +1,38 @@
{
"name": "browser_snapshot",
"description": "Capture accessibility snapshot of the current page, this is better than screenshot",
"arguments": {
"type": "object",
"properties": {
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
},
"interactive": {
"type": "boolean",
"description": "When true, only include interactive elements in the snapshot. Defaults to false."
},
"maxDepth": {
"type": "number",
"description": "Maximum depth for snapshot output. Defaults to 20."
},
"compact": {
"type": "boolean",
"description": "When true, outputs a more compact snapshot format. Defaults to false."
},
"selector": {
"type": "string",
"description": "Optional CSS selector to scope the snapshot to a subtree."
},
"includeDiff": {
"type": "boolean",
"description": "When true, include a diff vs the previous snapshot for this tab. Defaults to false."
},
"take_screenshot_afterwards": {
"type": "boolean",
"description": "When true, takes a screenshot after snapshot completes. Defaults to false."
}
},
"required": []
}
}

View File

@@ -0,0 +1,34 @@
{
"name": "browser_tabs",
"description": "List, create, close, or select a browser tab",
"arguments": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"list",
"new",
"close",
"select"
],
"description": "Operation to perform"
},
"index": {
"type": "number",
"description": "Tab index. Required for \"select\". Optional for \"close\" (defaults to current tab)."
},
"position": {
"type": "string",
"enum": [
"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\"."
}
},
"required": [
"action"
]
}
}

View File

@@ -0,0 +1,34 @@
{
"name": "browser_take_screenshot",
"description": "Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.",
"arguments": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Image format for the screenshot. Default is png."
},
"filename": {
"type": "string",
"description": "File name to save the screenshot to. Defaults to page-{timestamp}.{png|jpeg} if not specified."
},
"element": {
"type": "string",
"description": "Description of the element, if taking a screenshot of an element"
},
"ref": {
"type": "string",
"description": "CSS selector for the element, if taking a screenshot of an element"
},
"fullPage": {
"type": "boolean",
"description": "When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": []
}
}

View File

@@ -0,0 +1,42 @@
{
"name": "browser_type",
"description": "Type text into editable element",
"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"
},
"text": {
"type": "string",
"description": "Text to type into 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."
},
"submit": {
"type": "boolean",
"description": "Whether to submit entered text (press Enter after)"
},
"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."
},
"viewId": {
"type": "string",
"description": "Target browser tab ID. If omitted, uses the last interacted tab."
}
},
"required": [
"element",
"ref",
"text"
]
}
}

View File

@@ -0,0 +1,30 @@
{
"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": []
}
}