Skip to main content
Glama

select_text

Select matching text or place the cursor beside it in an observed editable element, then return the updated accessibility state for subsequent agent actions.

Instructions

Not yet supported on Windows. Select matching text, or place the cursor beside it, in an observed editable element. Returns the updated accessibility state after the action; a separate text-only get_app_state is normally unnecessary. Request a new screenshot before later coordinate input.

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": {
      "app": "<app>",
      "element_index": "<element_index>",
      "text": "<text>"
    },
    "name": "select_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesApp name or full app path; macOS bundle ID; macOS and Windows pid:<pid>; Windows process name, window title fragment, or Start-menu shortcut name; Linux desktop entry name, executable name or window title fragment
textYes
scopeNomacOS and Windows: element index from the latest returned state. Read only its retained subtree, renumbered from [1], including after actions. If it disappears, return the whole window with a notice. Linux returns INVALID_ARGUMENT.
prefixNo
suffixNo
element_indexYesElement index from the latest returned app state
selection_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true; the description adds meaningful context beyond that: a platform limitation (not supported on Windows), what the action returns (the updated accessibility state), and how to sequence subsequent coordinate input. It does not discuss failure modes when text is not found or permission requirements, which keeps it off a 5.

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?

Four short sentences, each carrying a distinct load: platform constraint, action semantics, return value, and follow-up sequencing. Nothing redundant and the hard limitation is front-loaded.

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 does explain the return (updated accessibility state), which is good. However, for a 7-parameter tool at 43% schema coverage, the role of prefix/suffix/scope and what happens when no match is found are left unexplained, leaving the definition partially complete for the tool's complexity.

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 coverage is 43% across 7 parameters, so the description needs to compensate. 'Select matching text, or place the cursor beside it' implicitly maps to the selection_type enum values, but prefix, suffix, and scope receive no explanation and the required 'text' parameter's matching semantics are only loosely implied.

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 names a specific verb and resource ('Select matching text, or place the cursor beside it, in an observed editable element'), which is clearly distinct from siblings like click, type_text, or set_value. It stops short of explicitly contrasting with those siblings, but the action is unambiguous.

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

Usage Guidelines4/5

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

It gives a real precondition ('in an observed editable element'), an explicit anti-pattern ('a separate text-only get_app_state is normally unnecessary'), and follow-up guidance ('Request a new screenshot before later coordinate input'). It does not name alternative tools for repositioning a cursor (e.g. press_key), so it falls short of full alternative routing.

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