Skip to main content
Glama

wavexis_dom_focus

Idempotent

Focus a DOM element matched by a CSS selector to set keyboard focus and trigger focus event handlers; use click instead to activate controls.

Instructions

Focus an element matching a CSS selector.

Use wavexis_click instead when the intent is to activate a control rather than focus it.

Side effects: Mutates DOM focus state; may trigger focus event handlers on the element. Returns: JSON string with keys: 'status' ('ok'/'error').

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": {
      "input": "<input>"
    },
    "name": "wavexis_dom_focus"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.6.24
    • addedInput schema / $defs / DOMFocusInput / properties / selector / description
      Added value: +"CSS selector for the target element"
    • addedInput schema / $defs / DOMFocusInput / properties / selector / minLength
      Added value: +1
    • addedInput schema / $defs / DOMFocusInput / properties / session_id / description
      Added value: +"Active session ID from wavexis_session_open"
  2. First observedv1.0.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, so the description's added value is the concrete consequence: it mutates DOM focus state and may fire focus event handlers. That tells the agent about observable side effects beyond the boolean hints, which is exactly the right complement.

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, then the alternative, then side effects and return shape — a sensible ordering with almost no filler. The explicit 'Returns' line is mild duplication given an output schema exists, but it is one short line.

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 single-parameter DOM tool with annotations and an output schema, the definition covers action, alternative, side effects and response shape. The remaining gap is match-ambiguity behavior (first match vs. error) and session prerequisites, which are left unstated.

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

Parameters2/5

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

Reported schema description coverage is 0% (nested $ref), so the description must carry parameter meaning. It only restates the selector as 'a CSS selector' and says nothing about session_id, its origin (wavexis_session_open), or what happens when the selector matches zero or multiple elements.

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 ('Focus') and resource ('an element matching a CSS selector'), and immediately distinguishes itself from wavexis_click by intent. An agent can select this tool over its siblings without opening any 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 exclusion rule: use wavexis_click when the intent is to activate a control rather than focus it. That is a real routing condition, though it doesn't cover other plausible cases (e.g. element not present, when to prefer wavexis_dom_query first).

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