Skip to main content
All browser tools require CodeFire to be running. Interactive tools (click, type, etc.) require the browser tab to be visible.

browser_navigate

Navigate the browser to a URL. Opens a new tab if none are open. Waits for page load to complete.
url
string
required
URL to navigate to
Example:
{
  "name": "browser_navigate",
  "arguments": {
    "url": "https://example.com"
  }
}

Page Inspection

browser_snapshot

Get the accessibility tree of the current page as compact structured text. Returns ARIA roles, labels, and interactive element refs. This is the primary tool for understanding page content and structure.
tab_id
string
Tab ID (defaults to active tab)
max_size
integer
Maximum response size in bytes (default: 102400 = 100KB). Set to 0 for unlimited. Large pages may be truncated with a hint to use browser_extract.
Example:
{
  "name": "browser_snapshot",
  "arguments": {
    "max_size": 200000
  }
}

browser_extract

Extract text content from a page element using a CSS selector. Returns the text content of the first matching element.
selector
string
required
CSS selector to find the element
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_extract",
  "arguments": {
    "selector": "article.main-content"
  }
}

browser_screenshot

Take a PNG screenshot of the current page. Returns the file path so you can read the image.
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_screenshot",
  "arguments": {}
}

browser_console_logs

Get JavaScript console log entries (log, warn, error, info) from a browser tab. Useful for debugging web applications.
tab_id
string
Tab ID (defaults to active tab)
level
string
Filter by level: log, warn, error, or info
Example:
{
  "name": "browser_console_logs",
  "arguments": {
    "level": "error"
  }
}

Tab Management

browser_list_tabs

List all open browser tabs with their URLs, titles, and loading state. Example:
{
  "name": "browser_list_tabs",
  "arguments": {}
}

browser_tab_open

Open a new browser tab. Optionally navigate to a URL.
url
string
URL to navigate to (optional)
Example:
{
  "name": "browser_tab_open",
  "arguments": {
    "url": "https://example.com"
  }
}

browser_tab_close

Close a browser tab by its ID.
tab_id
string
required
ID of the tab to close
Example:
{
  "name": "browser_tab_close",
  "arguments": {
    "tab_id": "tab-123"
  }
}

browser_tab_switch

Switch the active browser tab to the specified tab.
tab_id
string
required
ID of the tab to switch to
Example:
{
  "name": "browser_tab_switch",
  "arguments": {
    "tab_id": "tab-123"
  }
}

Interactions

browser_click

Click an element by its ref from browser_snapshot. Automatically scrolls into view first.
ref
string
required
Element ref from browser_snapshot (e.g. ‘e5’)
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_click",
  "arguments": {
    "ref": "e12"
  }
}

browser_type

Type text into an input or textarea element by ref. Clears existing content by default. Works with React and other framework-controlled inputs.
ref
string
required
Element ref from browser_snapshot
text
string
required
Text to type
clear
boolean
Clear existing content first (default: true)
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_type",
  "arguments": {
    "ref": "e8",
    "text": "[email protected]"
  }
}

browser_select

Select an option from a <select> dropdown by value or visible label text. On mismatch, returns all available options.
ref
string
required
Element ref of the select element
value
string
Option value to select
label
string
Option visible text to select (alternative to value)
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_select",
  "arguments": {
    "ref": "e15",
    "label": "United States"
  }
}

browser_scroll

Scroll the page by direction/amount, or scroll a specific element into view. Returns scroll position info.
ref
string
Scroll this element into view (overrides direction/amount)
direction
string
Scroll direction: up, down, top, or bottom
amount
integer
Pixels to scroll (default: 500, ignored for top/bottom)
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_scroll",
  "arguments": {
    "direction": "down",
    "amount": 1000
  }
}

browser_wait

Wait for an element to appear on the page. Use after clicking something that triggers async loading. Accepts ref or CSS selector. Returns found status, not an error on timeout.
ref
string
Wait for element with this ref to exist
selector
string
CSS selector to wait for (use when element has no ref yet)
timeout
integer
Max seconds to wait (default: 5, max: 15)
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_wait",
  "arguments": {
    "selector": ".loading-complete",
    "timeout": 10
  }
}

browser_press

Press a key or key combination. Targets a specific element by ref, or the currently focused element if no ref is provided.
key
string
required
Key to press: Enter, Tab, Escape, Backspace, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Space, Delete, Home, End, PageUp, PageDown, or any single character
modifiers
array
Modifier keys to hold: shift, ctrl, alt, meta
ref
string
Element ref to target (defaults to currently focused element)
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_press",
  "arguments": {
    "key": "Enter"
  }
}

browser_hover

Hover over an element by ref. Dispatches mouseenter and mouseover events. Useful for dropdown menus, tooltips, and hover-state UI.
ref
string
required
Element ref from browser_snapshot
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_hover",
  "arguments": {
    "ref": "e20"
  }
}

Advanced Interactions

browser_upload

Set a file on an <input type='file'> element. Reads the file from disk, encodes it, and assigns it to the input.
ref
string
required
Element ref of the file input from browser_snapshot
path
string
required
Absolute path to the file on disk
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_upload",
  "arguments": {
    "ref": "e10",
    "path": "/Users/dev/documents/resume.pdf"
  }
}

browser_drag

Drag an element to a target element using HTML5 drag and drop events.
from_ref
string
required
Ref of the element to drag
to_ref
string
required
Ref of the drop target element
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_drag",
  "arguments": {
    "from_ref": "e5",
    "to_ref": "e18"
  }
}

browser_iframe

Switch execution context to an iframe for subsequent commands (snapshot, click, type, etc.), or back to the main frame. Only same-origin iframes are accessible.
ref
string
Ref of the iframe element to enter. Omit to return to main frame.
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_iframe",
  "arguments": {
    "ref": "e7"
  }
}

browser_eval

Execute JavaScript on the page and return the result. Use ‘return’ to return values and ‘await’ for promises.
expression
string
required
JavaScript to evaluate. Use ‘return’ to return a value (e.g. ‘return document.title’)
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_eval",
  "arguments": {
    "expression": "return document.querySelectorAll('img').length"
  }
}

Session & Storage

browser_clear_session

Clear browsing data (cookies, cache, localStorage). Useful for resetting login state or testing fresh page loads.
types
array
Data types to clear: cookies, cache, localStorage, or all (default: all)
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_clear_session",
  "arguments": {
    "types": ["cookies", "localStorage"]
  }
}

browser_get_cookies

Get cookies for the current page, including httpOnly cookies not visible to JavaScript.
domain
string
Filter cookies by domain substring (e.g. ‘example.com’)
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_get_cookies",
  "arguments": {
    "domain": "example.com"
  }
}
Set a cookie on the current page. Useful for testing auth flows or setting feature flags.
name
string
required
Cookie name
value
string
required
Cookie value
domain
string
Cookie domain (defaults to current page domain)
path
string
Cookie path (defaults to ’/’)
max_age
integer
Max age in seconds
secure
boolean
Secure flag
same_site
string
SameSite attribute: Strict, Lax, or None
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_set_cookie",
  "arguments": {
    "name": "session_token",
    "value": "abc123",
    "max_age": 3600
  }
}

browser_get_storage

Read localStorage or sessionStorage contents. Returns item count, key-value pairs, and total size in bytes.
type
string
required
Which storage to read: localStorage or sessionStorage
prefix
string
Only return keys starting with this prefix
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "browser_get_storage",
  "arguments": {
    "type": "localStorage",
    "prefix": "user_"
  }
}

Network Monitoring

get_network_requests

Get a list of network requests made by the current page. Returns HTTP requests with method, URL, status code, and timing information.
tab_id
string
Tab ID (defaults to active tab)
filter
string
Filter requests by URL substring
Returns: Array of network request objects.
request_id
string
Unique request identifier
method
string
HTTP method (GET, POST, etc.)
url
string
Request URL
status
integer
HTTP status code
timestamp
number
Request timestamp (milliseconds since epoch)
duration_ms
number
Request duration in milliseconds
Example:
{
  "name": "get_network_requests",
  "arguments": {
    "filter": "/api/"
  }
}

get_request_detail

Get detailed information about a specific network request including headers, body, and response data.
request_id
string
required
Request ID from get_network_requests
Returns: Detailed request object with headers, request body, response body, and timing breakdown.
request_headers
object
HTTP request headers
request_body
string
Request body (if present)
response_headers
object
HTTP response headers
response_body
string
Response body (truncated if very large)
timing
object
Detailed timing breakdown (DNS, connection, transfer, etc.)
Example:
{
  "name": "get_request_detail",
  "arguments": {
    "request_id": "req_abc123"
  }
}

clear_network_log

Clear the network request log for the current tab. Useful for isolating requests from a specific action.
tab_id
string
Tab ID (defaults to active tab)
Example:
{
  "name": "clear_network_log",
  "arguments": {}
}
Clear the network log before performing an action you want to monitor, then use get_network_requests to see only the requests from that action.

Build docs developers (and LLMs) love