Skip to main content
Glama

accessibility

Destructive

START HERE to see and drive a window by element name (the OS accessibility tree). Pick an action: read_tree, find, get_element, focused, invoke, focus, set_value, get_value, expand, collapse, toggle, select, state, list_children, wait_for…

Instructions

START HERE to see and drive a window by element name (the OS accessibility tree). 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. read_tree / find list one line per element: [Role] "name" @x,y w×h — act on it with invoke + name; @x,y only for elements with no name. If invoke does not find the name, use smart_click with target = the label you can see: it finds the text by OCR and clicks it, with no screenshot. smart_type (target, text) does the same for typing. For sparse/ambiguous UIs: compile_ui fuses a11y+OCR into one ranked map with stable ids; find_button/find_field return an {element_id, snapshot_id} to pass to invoke/set_value. invoke, set_value, toggle and select change the app: before an irreversible one the user did not ask for (Send, Delete, Pay), ask with system pause_for_user.

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): replace the field's text (select-all inside a one-line field only). A document or text area keeps its text and gets the text at the cursor unless "replace" is passed. "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.
expectNoChecks run after the action; a failed check returns DEVIATION. Example: [{"type":"window_title_contains","value":"Inbox"}]. Fields: value for *_contains; name for app_running and element_exists; name+value for element_value_contains; path for file_*. State an outcome you can observe, not the 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".
withinNoOf several elements with that name, the one inside the window or dialog whose name contains this (as an ambiguous list names it)
purposeNofind_field: what the field is for, e.g. "email". compile_ui: 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 changedv2.1.0
    • changedInput schema / properties / mode / description
      Previous value: -"\"replace\" (default with a target): select all of the field, then type. \"append\": type at the cursor, keeping the content (default without a target)."New value: +"\"replace\" (default with a target): replace the field's text (select-all inside a one-line field only). A document or text area keeps its text and gets the text at the cursor unless \"replace\" is passed. \"append\": type at the cursor, keeping the content (default without a target)."
  2. Changed3 schema fields changedv2.0.0
    • changedInput schema / properties / expect / description
      Previous value: -"Optional 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."New value: +"Checks run after the action; a failed check returns DEVIATION. Example: [{\"type\":\"window_title_contains\",\"value\":\"Inbox\"}]. Fields: value for *_contains; name for app_running and element_exists; name+value for element_value_contains; path for file_*. State an outcome you can observe, not the text you typed."
    • changedInput schema / properties / purpose / description
      Previous value: -"What the compile is for (Where the action restricts it: one of general | find_text | act.)"New value: +"find_field: what the field is for, e.g. \"email\". compile_ui: general | find_text | act."
    • addedInput schema / properties / within
      Added value: +{
      +  "description": "Of several elements with that name, the one inside the window or dialog whose name contains this (as an ambiguous list names it)",
      +  "type": "string"
      +}
  3. 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"
      +]
  4. 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."
  5. First observedv1.5.16

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only flag the whole tool as destructive and non-idempotent, but the description narrows that to four specific mutating actions (invoke, set_value, toggle, select) and prescribes a confirmation step for irreversible ones (Send, Delete, Pay). That is real behavioral context beyond the annotation flags, though it says nothing about permissions, failure modes, or return shapes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence and workflow advice are front-loaded and earn their place, but reciting all 21 action names duplicates the action enum already present in the schema. The middle section is a run-on of backticked tokens that mixes workflow guidance with return-format detail, making it denser than it needs to be.

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 25-parameter tool with no output schema, the description supplies the missing operational picture: the element line format ([Role] "name" @x,y w×h), which actions mutate, and the element_id/snapshot_id handoff. Remaining gaps around timeout, paging and expect semantics are covered by the schema descriptions.

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 100%, so the baseline is 3, but the description goes somewhat beyond by explaining that target is the visible text to click and that find_button/find_field emit an {element_id, snapshot_id} pair consumed by invoke/set_value. It does not explain the many other parameters (mode, within, max_cost, expect), leaving that to the schema.

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?

The opening clause names a specific verb pair and resource: 'see and drive a window by element name (the OS accessibility tree)', and 'START HERE' positions it as the primary entry point relative to siblings. The full action enumeration makes the scope concrete enough that an agent can tell this is the generic a11y driver, not a browser- or computer-specific tool.

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

Usage Guidelines5/5

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

It gives explicit routing: use read_tree/find to list elements then invoke + name; if invoke cannot find the name, fall back to smart_click/smart_type by visible label; for sparse or ambiguous UIs use compile_ui, find_button or find_field and pass their {element_id, snapshot_id} into invoke/set_value. It also names an exclusion — ask the user via system pause_for_user before irreversible actions the user did not request.

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