Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • 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; },
  • 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));
  • The empty input schema used for the 'get-page-html' tool, defined using Zod as a strict empty object.
    emptySchema: z.object({}).strict(),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AdsPower/local-api-mcp-typescript'

If you have feedback or need assistance with the MCP directory API, please join our Discord server