Skip to main content
Glama
computer
by zznabil

Select text in element

element_select_text
Destructive

Select text within an element's value or place a caret without focus changes or keystrokes, and return the selection read back.

Instructions

Select text inside an element's value (or place a caret) without focus change or keystrokes; returns the selection read back. macOS backend.

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": {
      "ref": "<ref>",
      "text": "<text>"
    },
    "name": "element_select_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesElement ref from ax_tree/ax_find, e.g. "e12".
textYesText to select.
prefixNoText directly before.
selectNo"text" (default), "start" or "end".
suffixNoText directly after.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

Beyond the annotations the description adds real context: no focus change, no keystroke synthesis, and a read-back of the resulting selection. However, the annotations declare destructiveHint=true and readOnlyHint=false for what reads as a benign selection, and the description never clarifies what state might be destroyed or why this is not a read-only operation, leaving an agent with an unresolved discrepancy.

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 dense sentence with the core behavior front-loaded and no filler. The semicolon-separated clauses carry distinct information (behavior, return value, platform) rather than redundancy.

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?

With no output schema, the description usefully states the selection is returned, and it flags the macOS restriction. Still missing for a five-parameter mutation-flagged tool are failure modes (element not found, text not present in value) and any reconciliation with the destructive annotation.

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 parameter documentation burden is already met by the schema. The description only hints at the 'select' parameter through 'or place a caret' and adds no format or behavioral detail (e.g. how prefix/suffix disambiguate repeated occurrences) beyond the schema text.

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 ('Select text inside an element's value (or place a caret)') and implicitly separates itself from focus/typing siblings via 'without focus change or keystrokes'. It stops short of naming an alternative such as type_text or element_focus, so sibling disambiguation is inferential rather than explicit.

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?

Usage is only implied: the 'without focus change or keystrokes' clause suggests this is the right tool when the caller must not disturb focus, and 'macOS backend' implies a platform constraint. There is no explicit when-to-use/when-not-to-use statement or pointer to an alternative for non-macOS or for actually inserting text.

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