Skip to main content
Glama

browser_get_text

Extract text content from a web page or specific element via CSS selector or element ref; omit the selector to get the full body text.

Instructions

获取页面或指定元素的文本内容

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_get_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorNoCSS 选择器或 ref(如 e3),省略则取整个 body

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/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 behavioral burden and does little with it. It does not say whether hidden/offscreen text is included, whether the page must be loaded first, whether the call waits, or what happens when the selector matches nothing — all of which matter for a read tool that can fail silently.

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 action and with zero filler. It is efficient rather than padded, though the same brevity is what leaves the behavioral gaps noted elsewhere.

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?

The tool is simple — one optional parameter, no output schema, no nested objects — so the schema does most of the structural work and the description is minimally sufficient. Still, for a content-extraction call an agent would benefit from knowing the return shape (plain string vs structured) and the empty-match behavior, which are absent.

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 description coverage is 100%, so the single optional selector parameter is already fully documented in the schema, including the CSS-or-ref syntax and the default-to-body behavior. The description only mirrors that at a high level ('specified element') without adding syntax or format detail, so 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 specific verb + resource pair ('获取...文本内容' — get text content) and scopes it to either the whole page or a specified element, so an agent knows exactly what the tool returns conceptually. It does not, however, differentiate itself from siblings like browser_snapshot, browser_extract, or browser_evaluate, which all plausibly return page content.

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 and no alternatives named. In a catalog containing browser_snapshot, browser_extract, browser_extract_table, and browser_evaluate, the agent is left to infer why it would pick text extraction over snapshotting or evaluating JS.

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