Skip to main content
Glama

dev_text

Extract visible text from every element matching a CSS selector, each with an index, to inspect lists, menus, or labels and see what they actually say.

Instructions

Visible text of every element matching a selector, each with its index. Several matches are returned rather than refused — reading is not acting. Use it to check what a list, a menu or a label actually says, which is where 'undefined' shows up.

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": "dev_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorYesCSS selector.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the entire burden. It usefully discloses that multiple matches are returned instead of an error and that reading is non-mutating. But it leaves key behaviors unstated: what happens with zero matches, whether 'visible' means CSS visibility, viewport presence, or computed display, and whether the page is scrolled or modified.

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?

Three short sentences, front-loaded with the return content, followed by the non-mutation reassurance and a use case. The phrasing is slightly conversational ('which is where undefined shows up') but each sentence contributes information.

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?

For a single-parameter read tool with no output schema and no annotations, the description covers the core return shape but omits empty-result behavior and the precise meaning of visibility. Those omissions matter for correct invocation of a DOM-reading tool, so it is adequate but incomplete.

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?

One required parameter with 100% schema description coverage, so the schema already defines 'selector' as a CSS selector. The description reinforces that all matching elements are returned rather than only the first, which is a meaningful semantic hint about how the selector is applied, but adds no syntax or scoping detail beyond that.

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?

States a specific verb and resource: 'Visible text of every element matching a selector,' plus the detail that each result carries its index. That is more precise than the bare name dev_text and lets an agent distinguish it from action-oriented siblings like dev_click or dev_eval. It does not explicitly contrast with a snapshot-style tool, which keeps it from a 5.

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?

Offers a concrete when-to-use: checking what a list, menu, or label says, and finding where 'undefined' appears. However, it never names an alternative (e.g., a full snapshot tool) or states when this is the wrong choice, so the routing guidance is implied rather than explicit.

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

Deploy Server

Other Tools