get-page-html
Retrieve the HTML content of a webpage using the AdsPower LocalAPI MCP Server, enabling direct access to page source for analysis or integration with browser automation tasks.
Instructions
Get the html content of the page
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
}
Implementation Reference
- src/handlers/automation.ts:75-79 (handler)The handler function for the 'get-page-html' tool. It checks if the browser is connected and retrieves the full HTML content of the current page using Puppeteer's `page.content()` method, then returns it.async getPageHtml() { browser.checkConnected(); const html = await browser.pageInstance!.content(); return html; },
- src/utils/toolRegister.ts:65-66 (registration)Registers the 'get-page-html' tool on the MCP server with a description, empty input schema, and the wrapped handler from automationHandlers.server.tool('get-page-html', 'Get the html content of the page', schemas.emptySchema.shape, wrapHandler(automationHandlers.getPageHtml));
- src/types/schemas.ts:164-164 (schema)The empty input schema used for the 'get-page-html' tool, defined using Zod as a strict empty object.emptySchema: z.object({}).strict(),