browser_act
Automate browser interactions like clicking, form filling, content extraction, and navigation to streamline web-based workflows.
Instructions
Automate browser actions (click, fill, extract, navigate) ($0.005)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actions | Yes | List of actions: {type, url/selector/text/script} |
Implementation Reference
- index.js:50-79 (handler)The generic tool handler function that fetches from the IteraTools API endpoint.
async function callTool(endpoint, params) { const fetch = (await import('node-fetch')).default; const isGet = ['GET'].includes((TOOLS.find(t => t.endpoint === endpoint) || {}).method); const url = isGet ? `${BASE_URL}${endpoint}?${new URLSearchParams(params)}` : `${BASE_URL}${endpoint}`; const res = await fetch(url, { method: isGet ? 'GET' : 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${API_KEY}`, }, body: isGet ? undefined : JSON.stringify(params), }); const text = await res.text(); let data; try { data = JSON.parse(text); } catch { data = { raw: text }; } if (!res.ok) { if (res.status === 402) { throw new Error(`Insufficient credits. Add credits at https://iteratools.com. Cost: ${TOOLS.find(t=>t.endpoint===endpoint)?.price || 'see docs'}`); } throw new Error(`API error ${res.status}: ${text.substring(0, 200)}`); } return data; } - index.js:31-31 (registration)Registration of the browser_act tool in the TOOLS array, mapping it to the /browser/act endpoint.
{ name: 'browser_act', description: 'Automate browser actions (click, fill, extract, navigate)', inputSchema: { type: 'object', properties: { actions: { type: 'array', description: 'List of actions: {type, url/selector/text/script}', items: { type: 'object' } } }, required: ['actions'] }, endpoint: '/browser/act', price: '$0.005' },