Skip to main content
Glama
Browser MCP Server

Browser MCP Server

get_element_text

Extract the visible text of a web page element by CSS selector, so AI agents can read content and make decisions during browser automation.

Instructions

Get element text.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>"
    },
    "name": "get_element_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdNo
selectorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

D1.8/5.0
Behavior1/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 it discloses nothing. It does not say what happens when the selector matches no element, whether it waits or fails fast, whether it reads from pageId or the active page, or whether it auto-scrolls into view.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single short sentence is front-loaded and free of padding, but its brevity reflects under-specification rather than economy. There is no structure signaling scope, return content, or error behavior.

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

Completeness1/5

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

For a tool with two wholly undocumented parameters, no annotations, and no output schema, the description should explain at minimum what text is returned and what the optional pageId does. It leaves every behavioral question an agent would have before calling it unanswered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for both parameters, and the description adds no meaning: the format of `selector` (CSS, XPath, text?) is undocumented, as is the role of the optional `pageId` and which page is used when it is omitted. The description does nothing to compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a verb and resource ("Get element text"), which is more than a bare restatement of the name, but it stops there. It does not say whether "text" means innerText, textContent, or visible text, nor what distinguishes it from siblings like get_element_value and get_element_attribute.

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 guidance, no mention of prerequisites (does the element need to be visible or attached?), and no steering toward get_element_value, get_element_attribute, or wait_for_text. The agent must infer the selection criteria entirely from the tool name.

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