Skip to main content
Glama

browser_get_text

Extract visible text from a specific web page element with a CSS selector. Use it to read error messages, user info, or API responses rendered in HTML.

Instructions

Get the visible text content of a specific DOM element.

PREREQUISITE: browser_open and browser_go must have been called first.

Use this to read specific parts of a page (error messages, user info, API responses rendered in HTML). For full DOM analysis, use browser_get_dom instead.

Args: selector: CSS selector for the element (e.g. "#error-message", ".user-name", "h1") session_name: Browser session to use (default: "default")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNo
selectorYes
session_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It discloses the prerequisite, the read-only nature ('get visible text content'), and implies that only visible text is returned. However, it does not discuss edge cases like element-not-found or whether it waits for the page to load, which would be useful but is not critical for a simple getter.

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?

The description is concise and well-structured: a clear opening sentence, a prerequisite block, usage/sibling guidance, and a brief args list. Every sentence contributes value, with no fluff or redundant text.

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?

The tool is relatively simple, and the presence of an output schema reduces the need to explain return values. The description covers prerequisites, usage context, and an alternative tool. The main gap is the undocumented 'tab_id' parameter, which prevents full completeness. Overall, it is mostly complete but with this notable omission.

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?

The description adds meaning to 'selector' by giving examples and to 'session_name' by indicating a default, but it completely omits 'tab_id', which appears in the input schema. With schema description coverage at 0%, the description fails to fully compensate by documenting all parameters. This creates a potential gap for the AI agent in understanding the 'tab_id' parameter.

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?

The description clearly states the action ('Get the visible text content of a specific DOM element') and identifies the resource ('a specific DOM element'). It also distinguishes from the sibling tool 'browser_get_dom' by noting that the latter is for 'full DOM analysis', making the purpose specific and unambiguous.

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?

The description provides explicit usage context: 'Use this to read specific parts of a page' and an explicit when-not-to-use with a named alternative: 'For full DOM analysis, use browser_get_dom instead.' It also states a clear prerequisite ('browser_open and browser_go must have been called first'), giving thorough guidance on when to invoke the tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BobongKu/nodriver-proxy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server