Skip to main content
Glama

html

Read-only

Retrieve a full page's markup or extract a specific element by CSS selector, text, label, or reference for inspection and browser automation.

Instructions

Get HTML (whole page or a target — @eN, @text:Foo, @label:Email, CSS, etc.).

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

Input Schema

NameRequiredDescriptionDefault
leaseNoOptional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env.
targetNoOptional @eN / @text: / @label: / CSS.
sessionNoOptional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'.
max_charsNoCap the returned HTML.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.21.0
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "default": 40000,
      +  "description": "Cap the returned HTML.",
      +  "type": "integer"
      +}
  2. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds nothing behavioral beyond the selector syntax: it does not mention that output is capped (max_chars defaults to 40000) and can therefore be silently truncated, nor anything about page size, lease requirements, or output shape.

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?

A single short sentence, front-loaded with the verb and resource, with the selector examples parenthetically scoped. Nothing is wasted, though the telegraphic parenthetical reads more like a note than a structured definition.

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

Completeness3/5

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

All parameters are optional and the schema is fully documented, so the definition is callable as-is. However, for a tool whose default output is capped at 40k characters, the description should mention truncation or pagination behavior so the agent knows to narrow the target; that gap keeps it at minimum-viable rather than complete.

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%, so all four parameters are already documented in the schema. The description's selector examples merely restate the `target` parameter's own description; `lease`, `session`, and `max_chars` receive no additional meaning from the prose. Baseline 3 applies.

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 states a concrete verb+resource ('Get HTML') and clarifies the scope is either the whole page or a targeted element, with examples of accepted selector syntax. It implicitly distinguishes itself from markup-free siblings like `text` by naming HTML as the payload, but it never names those siblings explicitly.

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 no when-to-use / when-not-to-use guidance. An agent choosing between `html`, `text`, `content`, `attr`, and `extract` gets no criteria from this description; the choice must be inferred from the word 'HTML' alone.

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