Skip to main content
Glama

content_get_html

Fetch the current HTML markup of a tab's main document (up to 2,000 characters) for parsing or inspection without altering the page.

Instructions

Read the main document's current HTML, limited to 2,000 characters.

Use this for markup, or content_get_text for rendered text. Reads document.documentElement.outerHTML without changing the page; adds an ellipsis if truncated. Does not include iframe documents.

profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

Input Schema

NameRequiredDescriptionDefault
tab_idYesID of the tab to get HTML content from
profile_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the exact source (document.documentElement.outerHTML), that the page is not mutated, that truncation is marked with an ellipsis, that iframe documents are excluded, and that IDs are profile-local. It does not state whether the read is subject to any auth or timing constraints, leaving a small gap.

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?

Three short sentences, front-loaded with the core action and size limit, then the disambiguation, then the prerequisites. Nothing is repeated and no sentence is filler.

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

Completeness5/5

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

An output schema exists, so return shape need not be explained; the description still covers scope, truncation behavior, exclusions, and the profile-id prerequisite. Everything an agent needs to invoke this correctly on the first try is present.

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?

Schema coverage is only 50%, and the undocumented parameter is profile_id — the description compensates well by marking it required, naming profiles_list as its source, and warning that object IDs are local to that profile. tab_id is only covered by the schema's own text, and the description doesn't clarify the relationship between the chosen tab and 'the main document.'

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 ('Read the main document's current HTML') with an explicit 2,000-character scope bound. It is immediately distinguishable from content_get_text, which the description names directly.

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?

Gives an explicit selection rule: 'Use this for markup, or content_get_text for rendered text,' and adds a negative boundary ('Does not include iframe documents'). It also states the prerequisite that profile_id must come from profiles_list rather than being guessed.

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