Skip to main content
Glama

Act on an element

browser_act

Perform one action on a web element—click, type, hover, press, check, select, or scroll—and report any dialog or error it triggers.

Instructions

Do one thing to an element: click, double_click, right_click, hover, focus, type (value; replaces unless append), press (keys like "Enter", "Tab", "Escape", "ArrowDown", "Control+a"; without a target, presses on the focused element), check, uncheck, select (value = option label or value, native or custom dropdown), clear, scroll_into_view. Typing is sent key by key so autocompletes react. The result reports any dialog or error the action caused. For whole forms, prefer browser_invoke with the typed tool.

Input Schema

NameRequiredDescriptionDefault
refNoElement ref from browser_find or browser_capabilities.
keysNoFor press: e.g. "Enter" or "Shift+Tab".
stepsNoSeveral actions in order, in one call (e.g. open a dropdown, pick an option, press Join). Stops at the first that fails.
tabIdNo
valueNoText to type, or the option to select.
actionNo
appendNoFor type: add to the existing text instead of replacing it.
selectorNoCSS selector, if you have no ref.
dialogTextNoWith acceptDialog: what to type into a prompt.
acceptDialogNoAccept the confirm/prompt dialog this action opens (dialogs are dismissed by default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavioral traits: typing is dispatched key-by-key so autocompletes fire, steps 'stop at the first that fails', and the result reports any dialog or error the action caused. It omits whether dialogs are auto-dismissed unless acceptDialog is set — though that is in the schema — and says nothing about authorization or side-effect scope.

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 the action inventory, then the operational caveats, then the alternative — a sensible ordering. The single dense paragraph with nested parentheticals is heavier than ideal, but nearly every clause conveys distinct behavior rather than filler.

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 10-parameter mutation tool with no output schema and no annotations, the description covers actions, semantics of the important parameters, failure behavior, and the result contract. The main gap is tabId, which is documented in neither the schema nor the description, and no explicit guidance on browser_click overlap.

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 already 80%, so the baseline is 3. The description still adds meaning beyond it: it defines what 'press' accepts ('Enter', 'Tab', 'Control+a'), explains the replace-vs-append distinction for type, and clarifies that select's value is an option label or value for native or custom dropdowns. It leaves values undocumented for clear and scroll_into_view.

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 concrete verb ('Do one thing to an element') and enumerates the exact operations the tool performs (click, type, press, select, check, etc.), so the agent knows precisely what capability this is. It also marks the boundary of its scope by routing multi-step form workflows to browser_invoke.

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 explicit conditions in several places: 'For whole forms, prefer browser_invoke with the typed tool', 'without a target, presses on the focused element', and 'replaces unless append'. It does not, however, explain when to use this unified tool versus the sibling browser_click, which is the most likely disambiguation an agent needs.

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