Skip to main content
Glama

tool_element_action

Act on a UI element by its ref to press, set value, select, toggle, expand, collapse, scroll into view, or focus it without raising the window or injecting physical input.

Instructions

Perform an action on a UI element by the ref from element_at_point — this is the focus-free path: a UI Automation pattern is delivered to the element, so the window is never raised and z-order never matters. MUTATING (soft): serialized across agent sessions; NO physical input is injected, so it can run while the user types — just do not operate the very window the user is working in. action must be one of the actions listed for that element (press, set_value, select, toggle, expand, collapse, scroll_into_view, focus); set_value also needs text. Refuses with the supported list when the element does not offer the action.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes
textNo
actionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries full behavioral burden and does so thoroughly. It discloses mutation ('MUTATING (soft)'), serialization across sessions, lack of physical input injection, the ability to run during user typing, and refusal behavior with the supported action list. This is far beyond the minimal.

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?

The description is dense but every sentence earns its place. It front-loads the core purpose, then adds constraints, safety context, and parameter semantics in a logical order. No filler or tautology.

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

Completeness5/5

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

For a tool with 3 parameters and an output schema, the description is complete. It covers action constraints, the source of ref, the mutating behavior, safety implications, and refusal behavior. Return values are not explained, but the output schema already handles that.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It explains ref as coming from element_at_point, enumerates valid action values, and explicitly ties text to set_value. This adds substantial meaning to all three parameters, including the optional text parameter.

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?

States a specific verb ('Perform an action'), a precise resource ('a UI element by the ref from element_at_point'), and a distinguishing property ('focus-free path'). The description clearly differentiates this from coordinate-based or physical-input tools like tool_click_at and tool_element_action_at.

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?

Provides clear context: use this path when you have a ref from element_at_point and want a focus-free action. It also gives a concrete usage caveat ('do not operate the very window the user is working in') and notes it can run while the user types. It does not explicitly name alternatives or exclusions, but the guidance is strong enough to infer appropriate use.

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