Skip to main content
Glama

get_text

Extract text content from web elements in Electron applications using CSS selectors or element references for automated testing and data collection.

Instructions

Read the text content of the first matching element. Pass selector or ref. Does not wait.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNo
refNoRef from snapshot.
trimNoDefault true.
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: it reads text content (not attributes), operates on the first matching element (not all), and 'Does not wait' (implying immediate execution without delays). However, it misses details like error handling (e.g., if no element matches), permissions needed, or output format, leaving gaps for a tool with potential side effects.

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 highly concise and front-loaded, with two sentences that directly address purpose and key usage notes. Every word earns its place, avoiding redundancy or fluff, making it efficient for quick comprehension by an AI agent.

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?

Given 3 parameters, no annotations, and no output schema, the description is minimally adequate. It covers the core action and parameter usage but lacks details on return values, error cases, or integration with siblings like snapshot (which provides refs). For a tool in a rich UI automation context, more context on output and failures would improve completeness.

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 description coverage is 67% (2 of 3 parameters have descriptions). The description adds value by clarifying that 'selector' or 'ref' are alternative inputs for element identification, which isn't explicit in the schema. It also implies 'trim' defaults to true via context, though not directly stated. This compensates well for the partial schema coverage.

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 clearly states the action ('Read the text content') and target ('first matching element'), distinguishing it from siblings like get_attribute or get_value. However, it doesn't explicitly differentiate from tools like elements_list or snapshot that also involve element interaction, leaving some ambiguity about its unique scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying 'Pass selector or ref' and 'Does not wait', suggesting when to use parameters and a behavioral constraint. However, it lacks explicit guidance on when to choose this tool over alternatives like get_attribute (for non-text attributes) or wait_for_selector (for waiting), and doesn't mention prerequisites or exclusions.

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/mesomya/electron-driver'

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