Skip to main content
Glama

get-full-dom

Extract the complete Document Object Model (DOM) from a web page for analysis, testing, or automation tasks within browser interactions.

Instructions

Get the full DOM of the current page. (Deprecated, use get-context instead)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get-full-dom' tool. It captures an analytics event and retrieves the full HTML content of the current page using `page.content()`, then returns it as text content.
    async () => {
      posthogServer.capture({
        distinctId: getUserId(),
        event: 'get_full_dom',
      });
    
      const html = await page.content();
      return {
        content: [
          {
            type: "text",
            text: html,
          },
        ],
      };
    }
  • Registers the 'get-full-dom' tool with the MCP server, including name, description, empty input schema, and inline handler function. Note: marked as deprecated.
    server.tool(
      "get-full-dom",
      "Get the full DOM of the current page. (Deprecated, use get-context instead)",
      {},
      async () => {
        posthogServer.capture({
          distinctId: getUserId(),
          event: 'get_full_dom',
        });
    
        const html = await page.content();
        return {
          content: [
            {
              type: "text",
              text: html,
            },
          ],
        };
      }
    );
Behavior3/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. It states what the tool does (gets DOM) and its deprecation status, but doesn't disclose behavioral traits like performance characteristics, error conditions, or what 'full DOM' entails (e.g., size limits, format). The deprecation warning is valuable context, but more behavioral details would be helpful.

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 two short sentences with zero waste: the first states the purpose, the second provides critical usage guidance. It's front-loaded with the core function and efficiently includes the deprecation warning.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is reasonably complete. It covers purpose and usage guidance adequately. However, for a tool that retrieves DOM (which could be large or complex), more context about return format or limitations would enhance completeness, though not strictly required.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the baseline is 4. The description doesn't need to explain parameters, and it doesn't add any parameter information beyond what's already clear from the schema (no parameters).

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 resource ('full DOM of the current page'), making the purpose specific and understandable. It doesn't fully distinguish from all siblings (like 'get-context' which it references as alternative), but it's more specific than just restating the name.

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

Usage Guidelines5/5

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

The description explicitly provides usage guidance by stating 'Deprecated, use get-context instead', which clearly indicates when NOT to use this tool and names the alternative. This is direct and unambiguous guidance for the agent.

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/qabyai/playwright-mcp'

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