Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

get_content

Extract HTML or text content from web pages using the Chromium ARM64 Browser. Ideal for browser automation, web testing, and data extraction on ARM64 devices.

Instructions

Get page content (HTML or text)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoType of content to gettext

Implementation Reference

  • Core handler implementation for the 'get_content' MCP tool. Uses Chrome DevTools Protocol (CDP) commands to fetch either full HTML (DOM.getDocument + DOM.getOuterHTML) or page text content (Runtime.evaluate 'document.body.innerText').
    async getContent(type = 'text') { await this.ensureChromium(); if (type === 'html') { const result = await this.sendCDPCommand('DOM.getDocument'); const html = await this.sendCDPCommand('DOM.getOuterHTML', { nodeId: result.root.nodeId, }); return { content: [{ type: 'text', text: html.outerHTML }], }; } else { const result = await this.sendCDPCommand('Runtime.evaluate', { expression: 'document.body.innerText', returnByValue: true, }); return { content: [{ type: 'text', text: result.result.value || '' }], }; } }
  • Tool registration in ListToolsRequestSchema response, defining name, description, and input schema for 'get_content' (optional 'type' param).
    { name: 'get_content', description: 'Get page content (HTML or text)', inputSchema: { type: 'object', properties: { type: { type: 'string', enum: ['html', 'text'], description: 'Type of content to get', default: 'text', }, }, }, },
  • Core handler implementation for the 'get_content' MCP tool in the full server. Similar to browser-only version, fetches HTML or text content via CDP.
    async getContent(type) { await this.ensureChromium(); let content; if (type === 'html') { const doc = await this.sendCDPCommand('DOM.getDocument'); const html = await this.sendCDPCommand('DOM.getOuterHTML', { nodeId: doc.root.nodeId }); content = html.outerHTML; } else { const result = await this.sendCDPCommand('Runtime.evaluate', { expression: 'document.body.innerText', returnByValue: true }); content = result.result?.value || ''; } return { content: [{ type: 'text', text: content }], }; }
  • index.js:184-198 (registration)
    Tool registration in ListToolsRequestSchema response for the full-featured server, defining 'get_content' tool with input schema.
    { name: 'get_content', description: 'Get page content (HTML or text)', inputSchema: { type: 'object', properties: { type: { type: 'string', enum: ['html', 'text'], description: 'Type of content to get', default: 'text', }, }, }, },

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/nfodor/mcp-chromium-arm64'

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