Skip to main content
Glama

interact_with_element

Perform clicks, typing, hover, and other user actions on live DOM elements, then get before/after state and effect measurements to diagnose UI issues.

Instructions

Perform an interaction (click, double_click, right_click, hover, focus, blur, type, clear, press_key, select_option, scroll_into_view, scroll) on a live element and return before/after state and effect measurements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoKey name for press_key action (e.g. Enter, Escape, Tab, ArrowDown)
textNoText string for type action
actionYesThe user action to perform
nodeIdNoLogicalNodeId of the target element
selectorNoCSS selector of the target element
optionValueNoValue or label for select_option action
scrollDeltaNoScroll deltas for scroll action
selectedElementRefNoSelected element reference token
waitForStabilizationNoWait for DOM and network stabilization after interaction (default: true)
stabilizationTimeoutMsNoMax wait time in milliseconds (default: 300ms)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does disclose that the tool acts on a live element and returns before/after state and effect measurements, which is useful. However, it does not warn about side effects such as page navigation, irreversible mutations, or failures despite actions like click, clear, and press_key being potentially destructive.

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 a single sentence with no filler, front-loaded with the operation, and the parenthetical action list is dense but directly relevant. It earns its place without redundant phrasing.

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

Completeness2/5

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

This is a complex tool with 10 parameters, a nested scrollDelta object, conditional per-action requirements, and no output schema, yet the description is only one sentence. It does not explain element targeting options or which parameters are required for which actions, and there are no annotations to compensate.

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 description coverage is 100%, so the baseline is 3 and the schema already documents each parameter. The description mostly repeats the action enum and does not add meaning about action-specific parameter dependencies such as press_key needing key, select_option needing optionValue, or scroll needing scrollDelta.

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 description names a concrete operation ('Perform an interaction') on a specific target ('a live element'), enumerates all 12 action types, and states the return value ('before/after state and effect measurements'). This clearly distinguishes it from sibling read-only or inspection tools like get_dom_node or inspect_live_element.

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

Usage Guidelines3/5

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

The description implies usage through the action list and 'live element' phrasing, but it does not explicitly state when to use this tool over alternatives, nor does it mention any exclusions or when not to use it. No sibling tool is referenced as an alternative, so the agent must infer the intended context.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IrMaho/Mcp-DOM'

If you have feedback or need assistance with the MCP directory API, please join our Discord server