Browser tool

Learn how to use Browser tool with Composio

Overview

SLUG: BROWSER_TOOL

Description

Composio enables AI Agents and LLMs to authenticate and integrate with various tools via function calling.

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the [Browser tool toolkit’s playground](https://app.composio.dev/app/Browser tool)

For code examples, see the Tool calling guide and Provider examples.

Tool List

Tool Name: Copy Selected Text

Description

Copy currently selected text on the page to clipboard - ideal for extracting highlighted content, copying form data, or harvesting visible text selections.

Action Parameters

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Drag and Drop

Description

Execute precise drag and drop operations - essential for file uploads, list reordering, element moving, and complex UI interactions that require drag-based manipulation.

Action Parameters

button
stringDefaults to left
endX
integerRequired
endY
integerRequired
startX
integerRequired
startY
integerRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Fetch Webpage Content

Description

Read page content - essential before clicking. Use BEFORE clicking to: - Find CSS selectors for elements - Understand page layout - Verify current state FORMAT OPTIONS: - 'html': Raw HTML - use to find selectors for MouseClick - 'markdown': Clean text - use for reading/analysis WORKFLOW: FetchWebpage(format='html') -> find selector -> MouseClick(selector) WHEN TO USE: - Before any click to find the right selector - After actions to verify they worked - When you need to read page content - As fallback when screenshot fails

Action Parameters

format
stringDefaults to markdown
idleTtlSec
newPage
boolean
returnPartialOnTimeout
booleanDefaults to True
url
wait
integerDefaults to 1000

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Get Clipboard Content

Description

Read current content from the system clipboard - essential for data transfer workflows, extracting copied text, and reading user-copied data for processing.

Action Parameters

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Keyboard Shortcut

Description

Execute keyboard shortcuts and key combinations - essential for copy/paste, navigation, and application commands that agents need for efficient browser automation.

Action Parameters

holdTime
integer
keys
arrayRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Mouse Click

Description

Click element by CSS selector. WORKFLOW: 1. FetchWebpage(format='html') to see page elements 2. Find selector for target element 3. MouseClick(selector='#your-element') SELECTOR EXAMPLES: - By ID: '#submit-button' - By class: '.btn-primary' - By attribute: 'button[type="submit"]' - By text: 'a:has-text("Login")' - Combined: 'form#login button.submit' IF CLICK FAILS: 1. FetchWebpage to verify element exists 2. Check if element is visible 3. Try more specific selector 4. Use PerformWebTask for complex interactions

Action Parameters

button
stringDefaults to left
selector
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Mouse Double Click

Description

Execute a precise double click at specified screen coordinates - ideal for opening files, selecting text, or activating UI elements that require double click gestures.

Action Parameters

button
stringDefaults to left
x
integerRequired
y
integerRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Mouse Down (Press and Hold)

Description

Press and hold mouse button at coordinates - use for starting custom drag operations, text selections, or long-press interactions. Must be followed by MouseUp action to complete.

Action Parameters

button
stringDefaults to left
x
integerRequired
y
integerRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Mouse Move

Description

Move mouse cursor to precise coordinates without clicking - perfect for triggering hover effects, revealing tooltips, and positioning for subsequent interactions.

Action Parameters

x
integerRequired
y
integerRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Mouse Up (Release Button)

Description

Release mouse button at coordinates - completes drag operations, text selections, and long-press interactions. Should be used after MouseDown to finish mouse button sequences.

Action Parameters

button
stringDefaults to left
x
integerRequired
y
integerRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Navigate to URL

Description

START HERE - Creates browser session and loads URL. Creates a browser with: - Stealth mode (anti-bot protection) - CAPTCHA solving (automatic) - Profile persistence (stays logged in) Always show debugUrl to user so they can watch the browser live. WORKFLOW: Navigate(url) -> FetchWebpage() -> MouseClick/PerformWebTask -> verify RETURNS: - sessionId: Required for all subsequent actions - debugUrl: Live browser view URL (share with user) - pageSnapshot: Initial page content FORCE NEW SESSION: If browser is stuck or in bad state, use forceNewSession=True to: - Kill the current session - Start fresh with a new browser instance

Action Parameters

forceNewSession
boolean
idleTtlSec
url
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Paste Text

Description

Paste text content at the current cursor position - perfect for filling forms, inserting data into text fields, or quick content insertion at focused elements.

Action Parameters

text
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: AI Perform Web Task

Description

AI agent for autonomous multi-step web interactions. CONSTRAINTS: - 50 step maximum (each click/type/scroll = 1 step) WHEN TO USE: - Multi-step workflows (login, fill form, submit) - Complex interactions where selectors are unknown - Dynamic content that requires visual understanding WHEN NOT TO USE: - Simple navigation: use Navigate - Reading page content: use FetchWebpage - Single click with known selector: use MouseClick GOOD PROMPTS (fit in 50 steps): - "Click login, enter email 'test@test.com', click submit" - "Search for 'laptops' and click first result" - "Fill form with name='John', email='john@test.com', submit" BAD PROMPTS (too many steps): - "Scrape all products from entire catalog" - "Log in, change all settings, download all reports" BREAK DOWN COMPLEX TASKS into multiple calls.

Action Parameters

idleTtlSec
outputSchema
prompt
stringRequired
url

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Screenshot Webpage

Description

Capture high-quality screenshot of any webpage with extensive customization options - perfect for archiving, visual documentation, full-page captures, and cross-device viewport testing.

Action Parameters

captureFullHeight
boolean
height
integerDefaults to 720
idleTtlSec
imageQuality
integerDefaults to 80
scrollAllContent
boolean
url
stringRequired
wait
integerDefaults to 1000
width
integerDefaults to 1280

Action Response

data
stringRequired
error
mimeType
stringRequired
successful
booleanRequired

Tool Name: Scroll Page

Description

Scroll page to reveal hidden content. WHEN TO USE: - Element not visible on current viewport - Need to load infinite scroll content - Navigate long pages SCROLL AMOUNTS: - deltaY=200: Fine scroll (one section) - deltaY=400: Medium scroll - deltaY=800: Large jump - deltaY=-500: Scroll UP (negative) WORKFLOW: Scroll(deltaY=400) -> FetchWebpage() -> verify element visible

Action Parameters

deltaX
integer
deltaY
integerRequired
steps
integerDefaults to 1
useOs
booleanDefaults to True
x
integerDefaults to 640
y
integerDefaults to 360

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Set Clipboard Content

Description

Store text content in the system clipboard for later paste operations - perfect for preparing data transfers, staging content for forms, or cross-application data sharing.

Action Parameters

text
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Take Screenshot

Description

VISUAL VERIFICATION: Capture screenshot - MUST BE CALLED ALONE in multi_execute. 🚨 CRITICAL: Screenshot cannot be combined with other tools in same multi_execute call FALLBACK: If screenshot blocked/fails, use FetchWebpage diligently for information USE: Debug UI, verify states, document results after page changes RETURNS: S3 URL to downloadable screenshot image

Action Parameters

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Type Text

Description

Type text at current cursor position. PREREQUISITE: Click on input field first. WORKFLOW: 1. MouseClick(selector='input#email') 2. TypeText(text='hello@example.com') DELAY OPTIONS: - delay=0: Instant (default) - delay=50: Human-like speed - delay=100+: Slow, deliberate SPECIAL CHARACTERS: - Newlines: Include \n in text - Tab between fields: Use KeyboardShortcut(['Tab'])

Action Parameters

delay
integer
text
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired