Skip to main content
Glama

web_html

Retrieve the outer HTML of a web page or a specific element by CSS selector to inspect or extract page markup.

Instructions

Get outerHTML of the page, or of the element matching 'selector'.

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": "web_html"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorNo
max_charsNo
target_idNoTab id from web_tabs. Omit to use the first/active tab.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden and says nothing beyond 'it returns HTML'. It does not clarify read-only safety, whether it auto-navigates or requires an existing tab, what happens on an invalid or ambiguous selector, or how output is truncated.

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

Conciseness4/5

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

One front-loaded sentence with no filler; the selector-conditional scope is stated up front. It is efficient but borders on under-specification given the tool's three parameters.

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?

With no annotations, no output schema, and a third of parameters undocumented, the description should cover tab targeting, truncation, and failure modes, but it does not. An agent must guess how max_chars behaves and what happens when no tab is active.

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

Parameters2/5

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

Schema coverage is only 33%; target_id has a schema description, but 'max_chars' is undocumented in both schema and description, and the description never mentions size limiting or truncation behavior. 'selector' is implied to be a CSS selector, which is a small but real addition beyond the schema.

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?

States a specific verb ('Get') and resource ('outerHTML of the page, or of the element matching selector'), so an agent knows exactly what content flows back. It doesn't distinguish this from siblings like web_read or web_eval, so the boundary is left implicit.

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?

There is a conditional hint that supplying 'selector' narrows to one element, but no statement of when to prefer this over web_read (text) or web_eval (scripted extraction). No prerequisites, no exclusions, no mention that a tab must already be open.

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