Skip to main content
Glama

Extract page content

browser_extract

Read page content as deterministic text, links, or HTML, optionally scoped by a CSS selector, to gather facts or verify an outcome without a model call.

Instructions

Read page content as data, deterministically (free, no model call): mode "text" (default), "links", or "html", optionally scoped by a CSS selector. Use it to gather facts or verify an outcome rather than to act. text collapses whitespace and prefers article/main content; links returns up to 300 {text, href}; html is raw (default cap 100000).

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

Input Schema

NameRequiredDescriptionDefault
modeNoWhat to return (default "text").
selectorNoOptional CSS selector to scope the extraction; omitted = whole page.
max_charsNoCap on returned characters (default 20000; HTML 100000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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 free/no-model-call cost, determinism, whitespace collapsing, article/main-content preference, the 300-link cap, and the HTML character cap. Gaps remain around preconditions (must a page be open?) and failure behavior, which matter for a no-annotation tool.

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?

Front-loaded with the core definition and the cost/determinism qualifier, then mode details in a single dense sentence. Every clause earns its place, though the mode list and return details are compressed into one long sentence that is slightly harder to scan than necessary.

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?

With no output schema and no annotations, the description must supply return shape and safety context; it does describe return formats per mode and that nothing is mutated. It leaves out preconditions and error cases, which is the main residual gap for a 3-parameter tool of low complexity.

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 100%, so the baseline is 3; the description earns above that by explaining what each mode actually yields — text normalization and article preference, links as up to 300 {text, href} pairs, html as raw with a 100000 cap. It adds real semantic content the schema's one-line enum descriptions do not.

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 page content as data") plus the key differentiator from the rest of the browser_* family: it retrieves and returns content deterministically rather than acting. The three modes are named inline, so an agent can tell what it produces without opening the schema.

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?

Gives an explicit usage condition: "gather facts or verify an outcome rather than to act," which cleanly separates it from action tools like browser_click or browser_type. It stops short of naming specific siblings or stating when-not cases (e.g. use browser_find to locate text within a page).

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