scraping_browser_get_text
Extract text content from web pages for data collection and analysis using web scraping tools.
Instructions
Get the text content of the current page
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "scraping_browser_get_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- browser_tools.js:248-252 (handler)The main handler function for the 'scraping_browser_get_text' tool. It retrieves the current browser page and extracts the innerText from the body element using Puppeteer's $eval method.
execute: async()=>{ const page = await (await require_browser()).get_page(); try { return await page.$eval('body', body=>body.innerText); } catch(e){ throw new UserError(`Error getting text content: ${e}`); } }, - browser_tools.js:247-247 (schema)Zod schema defining the input parameters for the tool (no parameters required).
parameters: z.object({}), - browser_tools.js:307-320 (registration)The tool object is included in the exported 'tools' array, making it available for MCP registration when API_TOKEN is set.
export const tools = process.env.API_TOKEN ? [ scraping_browser_navigate, scraping_browser_go_back, scraping_browser_go_forward, scraping_browser_links, scraping_browser_click, scraping_browser_type, scraping_browser_wait_for, scraping_browser_screenshot, scraping_browser_get_text, scraping_browser_get_html, scraping_browser_scroll, scraping_browser_scroll_to, ] : [scraping_browser_activation_instructions];