Skip to main content
Glama

accessibility

Destructive

Read and drive desktop windows through the OS UI tree to locate controls by name or role, then invoke, set values, toggle, and verify state without screen coordinates.

Instructions

START HERE to see and drive a window: the OS accessibility tree — read element names, find by name/role, invoke, toggle, expand/collapse, set value, select an option, query state. Pick an action: read_tree, find, get_element, focused, invoke, focus, set_value, get_value, expand, collapse, toggle, select, state, list_children, wait_for, compile_ui, find_button, find_field, smart_click, smart_type, smart_read. Always preferred over computer.click(x,y) when the target has a name — more reliable across DPI, window resize, layout shifts. read_tree / find return one line per element — [Role] "name" @x,y w×h (SCREEN coordinates: click them with computer click space:"screen"), plus value= when there is one; page past "+N more" with offset. invoke, set_value, toggle and select change the app (pressing "Delete" deletes); a destructive target name (Send, Delete, Pay) needs the user's confirmation. For sparse/ambiguous UIs: compile_ui fuses a11y+OCR into one ranked map of elements with stable ids; find_button/find_field locate a target semantically and return an {element_id, snapshot_id} you pass straight to invoke/set_value (survives layout shifts, no coordinates).

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": {
      "action": "<action>"
    },
    "name": "accessibility"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo"replace" (default with a target): select all of the field, then type. "append": type at the cursor, keeping the content (default without a target).
nameNoElement name to search for
textNoThe text to type
limitNoHow many elements to list (default 60)
scopeNoRead scope: "focused" for focused element, "window" for active window, "screen" for full screen
valueNoValue for set-value action
actionYesWhich sub-action to perform. See this tool's description for the enum of valid values. Required: get_element/focus/get_value/expand/collapse/toggle/select/state/list_children: name; set_value: value; find_button: intent; find_field: purpose; smart_type: text.
expectNoOptional post-conditions to verify after this action (same assertion types as the verify tool: window_title_contains, app_running, element_exists, element_value_contains, clipboard_contains, file_exists, file_contains, ocr_contains, file_changed_since_start). If any FAIL the action returns a DEVIATION and you must adapt. State an OUTCOME you can observe (a window title, a rendered element/chip, a status) — NOT the raw text you typed.
intentNoWhat you want to do (submit/cancel/search/login/...)
offsetNoSkip this many elements — page past "… +N more" (default 0)
targetNoElement name/text to click (e.g., "Send", "Submit", "New Email"). Alias: "name".
purposeNoWhat the compile is for (Where the action restricts it: one of general | find_text | act.)
timeoutNoMax time in ms (default 5000)
max_costNoHard ceiling on perception cost (default ocr_ok)
processIdNoOptional: limit to a specific process
timeoutMsNoDefault 5000
element_idNoTarget a compiled element from compile_ui (requires snapshot_id)
intervalMsNoDefault 250
parentNameNoAlias for "name". Accessibility name of the parent element
controlTypeNoUI Automation control type. Either form works: "Button" or "ControlType.Button". An unrecognized type returns no results rather than silently searching unfiltered.
maxChildrenNoCap on children returned
snapshot_idNoThe compile_ui snapshot the element_id came from (requires element_id)
target_textNoIf set and absent from a11y, pull OCR to find it
automationIdNoAutomation ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.5.27
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "read_tree",
      -  "find",
      -  "get_element",
      -  "focused",
      -  "invoke",
      -  "focus",
      -  "set_value",
      -  "get_value",
      -  "expand",
      -  "collapse",
      -  "toggle",
      -  "select",
      -  "state",
      -  "list_children",
      -  "wait_for",
      -  "compile_ui",
      -  "find_button",
      -  "find_field",
      -  "smart_click",
      -  "smart_type",
      -  "smart_read",
      -  "click",
      -  "set-value",
      -  "get-value"
      -]New value: +[
      +  "read_tree",
      +  "find",
      +  "get_element",
      +  "focused",
      +  "invoke",
      +  "focus",
      +  "set_value",
      +  "get_value",
      +  "expand",
      +  "collapse",
      +  "toggle",
      +  "select",
      +  "state",
      +  "list_children",
      +  "wait_for",
      +  "compile_ui",
      +  "find_button",
      +  "find_field",
      +  "smart_click",
      +  "smart_type",
      +  "smart_read"
      +]
  2. Changed1 schema field changedv1.5.24
    • changedInput schema / properties / action / description
      Previous value: -"Which sub-action to perform. See this tool's description for the enum of valid values."New value: +"Which sub-action to perform. See this tool's description for the enum of valid values. Required: get_element/focus/get_value/expand/collapse/toggle/select/state/list_children: name; set_value: value; find_button: intent; find_field: purpose; smart_type: text."
  3. First observedv1.5.16

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructiveHint=true but cannot say which sub-actions mutate; the description does — '`invoke`, `set_value`, `toggle` and `select` change the app (pressing "Delete" deletes)' — and adds a confirmation rule for destructive target names (Send, Delete, Pay). It also discloses output shape (one line per element with [Role], name, @x,y, w×h, value=), the coordinate space (SCREEN, clickable via computer click space:"screen"), and pagination past '+N more' with offset.

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?

Front-loaded with 'START HERE' and purpose, then the action list, then the preference rule, then return format, then the sparse-UI fallback — a sensible funnel. It is dense and long, and the 21-name action dump is bulky, but it doubles as enum discovery and nearly every clause carries operational information.

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

Completeness4/5

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

For a 24-parameter, no-output-schema, multi-action tool this covers the essentials: purpose, sub-action routing, mutation and confirmation semantics, return format for the read paths, and cost/perception fallbacks. Return shape for the non-read actions (e.g. invoke, state, wait_for) is not described, and there is no output schema to fill that gap.

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 coverage is 100%, so the schema already carries parameter definitions and the baseline is 3. The description adds meaning the schema cannot: the `offset` paging idiom against '+N more', the screen-coordinate semantics of the x,y returned by `read_tree`/`find`, and the pairing contract that `find_button`/`find_field` yield an {element_id, snapshot_id} pair to hand to `invoke`/`set_value`.

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

Purpose5/5

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

Opens with a specific verb+resource framing ('see and drive a window: the OS accessibility tree') and enumerates the operation set (read, find, invoke, toggle, expand/collapse, set value, select, query state). It also names the sibling it replaces ('Always preferred over `computer.click(x,y)` when the target has a name'), so an agent can distinguish it from `computer` without opening a schema.

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?

Gives an explicit preference rule over `computer.click(x,y)` gated on the target having a name, and routes the harder cases: `compile_ui` / `find_button` / `find_field` for 'sparse/ambiguous UIs', with the resulting {element_id, snapshot_id} feeding `invoke`/`set_value`. It does not give per-action when/when-not guidance across all 21 sub-actions, so routing for the less common ones is left to inference.

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