Skip to main content
Glama

get_html

Retrieve the HTML of a selected element or the entire document to inspect page structure. Target elements with a CSS selector; omit it to read the full document.

Instructions

Return the HTML of an element (outerHTML) or the whole document. Useful for inspecting structure; for visible text use get_text.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_html"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorNoCSS selector. Omit to read the whole document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
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 behavioral burden. It discloses that the tool returns outerHTML for an element or the whole document, but it does not mention output size, whether hidden elements/scripts/styles are included, or any execution constraints for large documents.

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?

Two sentences, front-loaded with the return behavior, followed immediately by the practical distinction from get_text. No unnecessary wording.

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?

For a simple one-parameter read tool with no output schema, the description covers what is returned and how it differs from the visible-text sibling. It is nearly complete, though it could briefly note output-size or content-inclusion behavior given the absence of annotations.

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?

Schema coverage is 100%, and the schema already explains that the selector is a CSS selector and can be omitted to read the whole document. The description mirrors that meaning rather than adding new parameter guidance, so baseline 3 is appropriate.

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

Purpose5/5

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

States a specific verb and resource: return the HTML of an element (outerHTML) or the whole document. It also distinguishes itself from the sibling tool get_text by contrasting structural HTML with visible text.

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

Usage Guidelines4/5

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

Explicitly recommends get_text for visible text, which gives the agent a clear alternative. It does not state exclusions such as when full-document HTML would be too large or when evaluate might be preferable, but the primary routing guidance is clear.

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