{
  "tools": [
    {
      "name": "browser_close",
      "description": "Close the page",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Close browser",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_resize",
      "description": "Resize the browser window",
      "inputSchema": {
        "type": "object",
        "properties": {
          "width": {
            "type": "number",
            "description": "Width of the browser window"
          },
          "height": {
            "type": "number",
            "description": "Height of the browser window"
          }
        },
        "required": [
          "width",
          "height"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Resize browser window",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_console_messages",
      "description": "Returns all console messages",
      "inputSchema": {
        "type": "object",
        "properties": {
          "level": {
            "default": "info",
            "description": "Level of the console messages to return. Each level includes the messages of more severe levels. Defaults to \"info\".",
            "type": "string",
            "enum": [
              "error",
              "warning",
              "info",
              "debug"
            ]
          },
          "all": {
            "description": "Return all console messages since the beginning of the session, not just since the last navigation. Defaults to false.",
            "type": "boolean"
          },
          "filename": {
            "description": "File name to save the console messages to. Relative file names are resolved against the workspace root. If not provided, messages are returned as text.",
            "type": "string"
          }
        },
        "required": [
          "level"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Get console messages",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_handle_dialog",
      "description": "Handle a dialog",
      "inputSchema": {
        "type": "object",
        "properties": {
          "accept": {
            "type": "boolean",
            "description": "Whether to accept the dialog."
          },
          "promptText": {
            "description": "The text of the prompt in case of a prompt dialog.",
            "type": "string"
          }
        },
        "required": [
          "accept"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Handle a dialog",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_emulate_media",
      "description": "Emulate CSS media features for the page, for example switch between the light and dark color scheme. Omitted parameters are left unchanged; null clears an override.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "colorScheme": {
            "description": "Emulates the prefers-color-scheme media feature",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "light",
                  "dark"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "reducedMotion": {
            "description": "Emulates the prefers-reduced-motion media feature",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "reduce",
                  "no-preference"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "forcedColors": {
            "description": "Emulates the forced-colors media feature",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "active",
                  "none"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "contrast": {
            "description": "Emulates the prefers-contrast media feature",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "more",
                  "no-preference"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "media": {
            "description": "Changes the CSS media type of the page",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "screen",
                  "print"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Emulate media features",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_evaluate",
      "description": "Evaluate JavaScript expression on page or element",
      "inputSchema": {
        "type": "object",
        "properties": {
          "element": {
            "description": "Human-readable element description used to obtain permission to interact with the element",
            "type": "string"
          },
          "target": {
            "description": "Exact target element reference from the page snapshot, or a unique element selector",
            "type": "string"
          },
          "function": {
            "type": "string",
            "description": "() => { /* code */ } or (element) => { /* code */ } when element is provided"
          },
          "filename": {
            "description": "File name to save the result to. Relative file names are resolved against the workspace root. If not provided, result is returned as text.",
            "type": "string"
          }
        },
        "required": [
          "function"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Evaluate JavaScript",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_file_upload",
      "description": "Upload one or multiple files",
      "inputSchema": {
        "type": "object",
        "properties": {
          "paths": {
            "description": "The absolute paths to the files to upload. Can be single file or multiple files. If omitted, file chooser is cancelled.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Upload files",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_drop",
      "description": "Drop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of \"paths\" or \"data\" must be provided.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "element": {
            "description": "Human-readable element description used to obtain permission to interact with the element",
            "type": "string"
          },
          "target": {
            "type": "string",
            "description": "Exact target element reference from the page snapshot, or a unique element selector"
          },
          "paths": {
            "description": "Absolute paths to files to drop onto the element.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "description": "Data to drop, as a map of MIME type to string value (e.g. {\"text/plain\": \"hello\", \"text/uri-list\": \"https://example.com\"}).",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "target"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Drop files or data onto an element",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_find",
      "description": "Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "text": {
            "description": "Plain text to search for in the page snapshot (case-insensitive substring match). Provide either text or regex, not both.",
            "type": "string"
          },
          "regex": {
            "description": "Regular expression to search for in the page snapshot. Matching is case-sensitive by default; wrap the pattern in slashes to add flags, e.g. \"/error/i\" for case-insensitive. Provide either text or regex, not both.",
            "type": "string"
          },
          "filename": {
            "description": "Save results to a file instead of returning them in the response. Relative file names are resolved against the workspace root.",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Find in page snapshot",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_fill_form",
      "description": "Fill multiple form fields",
      "inputSchema": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "element": {
                  "description": "Human-readable element description used to obtain permission to interact with the element",
                  "type": "string"
                },
                "target": {
                  "type": "string",
                  "description": "Exact target element reference from the page snapshot, or a unique element selector"
                },
                "name": {
                  "type": "string",
                  "description": "Human-readable field name"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "textbox",
                    "checkbox",
                    "radio",
                    "combobox",
                    "slider"
                  ],
                  "description": "Type of the field"
                },
                "value": {
                  "type": "string",
                  "description": "Value to fill in the field. If the field is a checkbox, the value should be `true` or `false`. If the field is a combobox, the value should be the text of the option."
                }
              },
              "required": [
                "target",
                "name",
                "type",
                "value"
              ],
              "additionalProperties": false
            },
            "description": "Fields to fill in"
          }
        },
        "required": [
          "fields"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Fill form",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_press_key",
      "description": "Press a key on the keyboard",
      "inputSchema": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Name of the key to press or a character to generate, such as `ArrowLeft` or `a`"
          }
        },
        "required": [
          "key"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Press a key",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_type",
      "description": "Type text into editable element",
      "inputSchema": {
        "type": "object",
        "properties": {
          "element": {
            "description": "Human-readable element description used to obtain permission to interact with the element",
            "type": "string"
          },
          "target": {
            "type": "string",
            "description": "Exact target element reference from the page snapshot, or a unique element selector"
          },
          "text": {
            "type": "string",
            "description": "Text to type into the element"
          },
          "submit": {
            "description": "Whether to submit entered text (press Enter after)",
            "type": "boolean"
          },
          "slowly": {
            "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.",
            "type": "boolean"
          }
        },
        "required": [
          "target",
          "text"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Type text",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_navigate",
      "description": "Navigate to a URL",
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The URL to navigate to"
          }
        },
        "required": [
          "url"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Navigate to a URL",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_navigate_back",
      "description": "Go back to the previous page in the history",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Go back",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_network_requests",
      "description": "Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "static": {
            "default": false,
            "description": "Whether to include successful static resources like images, fonts, scripts, etc. Defaults to false.",
            "type": "boolean"
          },
          "filter": {
            "description": "Only return requests whose URL matches this regexp (e.g. \"/api/.*user\").",
            "type": "string"
          },
          "filename": {
            "description": "File name to save the network requests to. Relative file names are resolved against the workspace root. If not provided, requests are returned as text.",
            "type": "string"
          }
        },
        "required": [
          "static"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "List network requests",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_network_request",
      "description": "Returns full details (headers and body) of a single network request, or a single part if `part` is set. Use the number from browser_network_requests.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "1-based index of the request, as printed by browser_network_requests."
          },
          "part": {
            "description": "Return only this part of the request. Omit to return full details.",
            "type": "string",
            "enum": [
              "request-headers",
              "request-body",
              "response-headers",
              "response-body"
            ]
          },
          "filename": {
            "description": "File name to save the result to. Relative file names are resolved against the workspace root. If not provided, output is returned as text.",
            "type": "string"
          }
        },
        "required": [
          "index"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Show network request details",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_run_code_unsafe",
      "description": "Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "code": {
            "description": "A JavaScript function containing Playwright code to execute. It will be invoked with a single argument, page, which you can use for any page interaction. For example: `async (page) => { await page.getByRole('button', { name: 'Submit' }).click(); return await page.title(); }`",
            "type": "string"
          },
          "filename": {
            "description": "Load code from the specified file. Relative file names are resolved against the workspace root. If both code and filename are provided, code will be ignored.",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Run Playwright code (unsafe)",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "element": {
            "description": "Human-readable element description used to obtain permission to interact with the element",
            "type": "string"
          },
          "target": {
            "description": "Exact target element reference from the page snapshot, or a unique element selector",
            "type": "string"
          },
          "type": {
            "description": "Image format for the screenshot. If unset, inferred from the filename extension, otherwise png.",
            "type": "string",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ]
          },
          "filename": {
            "description": "File name to save the screenshot to. Relative file names are resolved against the workspace root. If not specified, the screenshot is saved into the output directory as `page-{timestamp}.{png|jpeg|webp}`.",
            "type": "string"
          },
          "fullPage": {
            "description": "When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.",
            "type": "boolean"
          },
          "scale": {
            "default": "css",
            "description": "Image resolution scale. \"css\" produces a screenshot sized in CSS pixels (smaller, consistent across devices). \"device\" produces a high-resolution screenshot using device pixels (larger, accounts for the device pixel ratio). Default is css.",
            "type": "string",
            "enum": [
              "css",
              "device"
            ]
          }
        },
        "required": [
          "scale"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Take a screenshot",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_snapshot",
      "description": "Capture accessibility snapshot of the current page, this is better than screenshot",
      "inputSchema": {
        "type": "object",
        "properties": {
          "target": {
            "description": "Exact target element reference from the page snapshot, or a unique element selector",
            "type": "string"
          },
          "filename": {
            "description": "Save snapshot to a file instead of returning it in the response. Relative file names are resolved against the workspace root.",
            "type": "string"
          },
          "depth": {
            "description": "Limit the depth of the snapshot tree",
            "type": "number"
          },
          "boxes": {
            "description": "Include each element's bounding box as [box=x,y,width,height] in the snapshot. Coordinates are viewport-relative, in CSS pixels (Element.getBoundingClientRect)",
            "type": "boolean"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Page snapshot",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_click",
      "description": "Perform click on a web page",
      "inputSchema": {
        "type": "object",
        "properties": {
          "element": {
            "description": "Human-readable element description used to obtain permission to interact with the element",
            "type": "string"
          },
          "target": {
            "type": "string",
            "description": "Exact target element reference from the page snapshot, or a unique element selector"
          },
          "doubleClick": {
            "description": "Whether to perform a double click instead of a single click",
            "type": "boolean"
          },
          "button": {
            "description": "Button to click, defaults to left",
            "type": "string",
            "enum": [
              "left",
              "right",
              "middle"
            ]
          },
          "modifiers": {
            "description": "Modifier keys to press",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Alt",
                "Control",
                "ControlOrMeta",
                "Meta",
                "Shift"
              ]
            }
          }
        },
        "required": [
          "target"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Click",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_drag",
      "description": "Perform drag and drop between two elements",
      "inputSchema": {
        "type": "object",
        "properties": {
          "startElement": {
            "description": "Human-readable source element description used to obtain the permission to interact with the element",
            "type": "string"
          },
          "startTarget": {
            "type": "string",
            "description": "Exact target element reference from the page snapshot, or a unique element selector"
          },
          "endElement": {
            "description": "Human-readable target element description used to obtain the permission to interact with the element",
            "type": "string"
          },
          "endTarget": {
            "type": "string",
            "description": "Exact target element reference from the page snapshot, or a unique element selector"
          }
        },
        "required": [
          "startTarget",
          "endTarget"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Drag mouse",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_hover",
      "description": "Hover over element on page",
      "inputSchema": {
        "type": "object",
        "properties": {
          "element": {
            "description": "Human-readable element description used to obtain permission to interact with the element",
            "type": "string"
          },
          "target": {
            "type": "string",
            "description": "Exact target element reference from the page snapshot, or a unique element selector"
          }
        },
        "required": [
          "target"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Hover mouse",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_select_option",
      "description": "Select an option in a dropdown",
      "inputSchema": {
        "type": "object",
        "properties": {
          "element": {
            "description": "Human-readable element description used to obtain permission to interact with the element",
            "type": "string"
          },
          "target": {
            "type": "string",
            "description": "Exact target element reference from the page snapshot, or a unique element selector"
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of values to select in the dropdown. This can be a single value or multiple values."
          }
        },
        "required": [
          "target",
          "values"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Select option",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_tabs",
      "description": "List, create, close, or select a browser tab.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "list",
              "new",
              "close",
              "select"
            ],
            "description": "Operation to perform"
          },
          "index": {
            "description": "Tab index, used for close/select. If omitted for close, current tab is closed.",
            "type": "number"
          },
          "url": {
            "description": "URL to navigate to in the new tab, used for new.",
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Manage tabs",
        "readOnlyHint": false,
        "destructiveHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "browser_wait_for",
      "description": "Wait for text to appear or disappear or a specified time to pass",
      "inputSchema": {
        "type": "object",
        "properties": {
          "time": {
            "description": "The time to wait in seconds, at most 30",
            "type": "number"
          },
          "text": {
            "description": "The text to wait for",
            "type": "string"
          },
          "textGone": {
            "description": "The text to wait for to disappear",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false
      },
      "annotations": {
        "title": "Wait for",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": true
      }
    }
  ]
}
