Skip to main content
Glama

提取文本

browser_extract
Read-onlyIdempotent

Extracts readable plain text from the active browser page or a specific element by ref, letting AI agents capture content without interactive elements.

Instructions

Extract readable text from the page (or a specific element by ref) as plain text. Better than snapshot when you only need content, not interactive elements.

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
refNoExtract text of this element only (default: whole page)
tabIdNoTab id (default: active tab)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds real value beyond that by disclosing that the output is readability-processed plain text rather than raw DOM, and that extraction can be scoped to a single element ref or default to the whole page.

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, no filler, with the core function front-loaded and the disambiguation second. Every clause carries information an agent can act on.

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 zero-required-parameter read tool with full schema coverage and no output schema, the definition covers what is extracted, from where, and in what form. It stops short of noting whether extraction waits for page load or truncates very large pages, which would matter in practice but are minor gaps.

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 both parameters already document their defaults, so the schema does the heavy lifting. The description corroborates the element-vs-whole-page default but adds no syntax for ref or any tab-handling nuance beyond the schema.

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 (extract) plus the resource (readable text of the page or a ref-specified element) and the output form (plain text). It explicitly contrasts itself with a snapshot-style tool, so an agent can tell which one to reach for without opening a 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 a clear selection rule: use this when you only need content, not interactive elements. It does not spell out a when-not case (e.g. needing links, structure, or attributes), but the implied boundary against the snapshot alternative is strong enough for most decisions.

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