Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

get_content

Extract HTML or text content from web pages for browser automation and testing workflows on ARM64 devices.

Instructions

Get page content (HTML or text)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoType of content to gettext

Implementation Reference

  • Registration of the 'get_content' tool in the ListToolsRequestSchema handler, including name, description, and 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',
              },
            },
          },
        },
        {
          name: 'screenshot',
          description: 'Take a screenshot of the current page',
          inputSchema: {
            type: 'object',
            properties: {
              name: {
                type: 'string',
                description: 'Name for the screenshot file',
                default: 'screenshot.png',
              },
              fullPage: {
                type: 'boolean',
                description: 'Capture full page',
                default: false,
              },
            },
          },
        },
        {
          name: 'evaluate',
          description: 'Execute JavaScript in the browser (read-only operations)',
          inputSchema: {
            type: 'object',
            properties: {
              script: {
                type: 'string',
                description: 'JavaScript code to execute (for reading page info)',
              },
            },
            required: ['script'],
          },
        },
        {
          name: 'close_browser',
          description: 'Close the browser instance',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
      ],
    }));
  • Core handler implementation for get_content tool. Uses CDP commands to fetch either full HTML or body text content from the browser page.
    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 || '' }],
        };
      }
    }
  • index.js:185-198 (registration)
    Tool registration in ListToolsRequestSchema for the full-featured server, defining name, description, and 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',
          },
        },
      },
    },
  • Primary handler for get_content in the comprehensive Chromium MCP server. Retrieves page content as HTML or text using DevTools Protocol.
    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 }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does (get page content) but lacks critical behavioral details: it doesn't specify what 'page' refers to (e.g., current browser page, requires prior navigation), whether it's read-only (implied but not explicit), error handling, or output format beyond HTML/text. For a tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (4 words) and front-loaded, stating the core purpose without any waste. Every word earns its place: 'Get' (action), 'page content' (resource), and '(HTML or text)' (key detail). It's appropriately sized for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (interacting with page content), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'page' means in context (likely requires a browser session), how content is retrieved, potential errors, or return values. For a tool in a browser automation context with siblings like navigate and click, more context is needed to ensure proper use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'type' fully documented in the schema (enum: html/text, default: text). The description adds minimal value beyond the schema by mentioning 'HTML or text', which aligns with the enum but doesn't provide additional context like when to choose one over the other. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'get' and the resource 'page content', specifying the format options (HTML or text). It distinguishes from siblings like get_console_logs or get_network_errors by focusing on page content rather than logs or errors. However, it doesn't explicitly differentiate from tools like evaluate or get_selected_element that might also retrieve content in some form.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a page loaded via navigate), exclusions, or comparisons to siblings like evaluate (which might process content) or get_selected_element (which might get specific element content). Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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