Skip to main content

MCP Tools Reference

The BAP MCP server exposes 23 tools organized into six categories. With --slim mode, only 5 essential tools are exposed.
Navigate back in browser history.No parameters.
Navigate forward in browser history.No parameters.
Reload the current page.No parameters.

Element Interaction

Click an element using semantic selectors.
string
required
Element selector (see Selector Formats below).
Fill a form field. Clears existing content first.
string
required
Element selector targeting the input field.
string
required
The value to fill.
Type text character by character. First clicks the element, then types. Triggers individual key events.
string
required
Element selector.
string
required
Text to type character by character.
number
Delay in milliseconds between keystrokes.
Press keyboard keys (Enter, Tab, shortcuts).
string
required
Key to press (e.g., Enter, Tab, Escape, Control+a).
string
Optional element to focus before pressing.
Select an option from a dropdown.
string
required
Element selector targeting the <select> element.
string
required
Option value or visible text to select.
Scroll the page or a specific element.
string
default:"down"
Scroll direction: up, down, left, right.
number
default:"300"
Pixels to scroll.
string
Optional element to scroll into view.
Hover over an element.
string
required
Element selector.

Observation

AI-optimized page observation. Returns interactive elements with stable refs. Supports incremental diffs and response tiers.
number
default:"50"
Maximum elements to return.
string[]
Filter by ARIA roles (e.g., ["button", "link", "textbox"]).
boolean
default:"false"
Include an annotated screenshot with element refs.
boolean
default:"false"
Return only changes since the last observation: { added, updated, removed }.
string
Response tier: full, interactive, minimal.
boolean
default:"false"
Include tools discovered via the WebMCP standard.
Take a screenshot of the current page.
boolean
default:"false"
Capture the entire scrollable page.
Token-efficient YAML accessibility snapshot. Approximately 80% fewer tokens than accessibility.No parameters.
Prefer aria_snapshot over accessibility for cost efficiency. Same structure, far fewer tokens.
Full accessibility tree.No parameters.
Get page text content.
string
default:"text"
Output format: text or markdown.
Query element properties: exists, visible, enabled, checked, value.
string
required
Element selector.

AI Agent Methods

Execute a sequence of browser actions in a single call. Supports fused pre/post observation.
array
required
Array of action steps. Each step has action, selector, and optionally value.
object
Observe page state before executing steps.
object
Observe page state after executing steps. Contains maxElements, responseTier.
Extract structured data from the page using schema and CSS heuristics.
string
Natural language description of what to extract.
string
Extraction mode: single (one object) or list (array of objects).
object
JSON Schema defining the extraction shape.

Page Management

List all open pages/tabs.No parameters.
Switch to a different page/tab.
string
required
Page ID from the pages result.
Close the current page/tab.No parameters.

Discovery

Discover tools that websites expose via the W3C WebMCP standard. Checks for declarative (form-based) and imperative (navigator.modelContext) tool definitions.No parameters.

Selector Formats

All tools that accept a selector parameter support these formats:
Always prefer role: selectors for buttons, links, and inputs. They survive DOM changes. Never copy CSS selectors from browser DevTools.

Resources

The MCP server also exposes 4 resources: