browser_form
Inspect all form fields (input, select, textarea, button) inside a CSS selector container to get field details and exact selectors, preventing accidental targeting of wrong inputs.
Instructions
Inspect all form fields (input, select, textarea, button) within a CSS-selector-specified container and return their name, type, id, current value, hint text, disabled/readOnly state, and associated label text (resolved via for[id], ancestor LABEL, aria-labelledby, aria-label in that order). Use this before browser_fill to discover exact field selectors and avoid accidentally targeting the wrong input (e.g. a global search bar). Caveats: Requires browser_open (CDP active). Hidden inputs (type=hidden) are excluded by default — set includeHidden:true if needed. Value text is truncated at 200 chars.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector for the form or container element to inspect (e.g. '#login-form', '.search-bar'). All input, select, textarea, and button descendants are returned. | |
| includeHidden | No | When true, include hidden inputs (type=hidden). Default false to avoid CSRF-token / serialized-state clutter. | |
| maxResults | No | Maximum number of form fields to return (default 100). | |
| tabId | No | Tab ID from browser_open. Omit to use the first page tab. | |
| port | No | Chrome/Edge CDP remote debugging port. | |
| includeContext | No | When true, append activeTab and readyState context to the response. | |
| include | No | Optional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients). |