Skip to main content
Glama
DB-25

arc-control-mcp

Press Key

press_key

Dispatch a key press to a selected or focused element to invoke its key handlers; reports if the event was prevented and when the DOM settles.

Instructions

Dispatch a key press to an element, or to the focused element when no selector is given. Handles named keys (Enter, Escape, Tab, ArrowDown) and single printable characters; an unknown name fails. Only the page's own key handlers react: a synthetic key types no character, moves no focus and submits no form. defaultPrevented says whether a handler took it. To type, use fill. Returns only a minimal identity for the element that received the key (tag plus whichever of id, name, type and aria-label exist); use query_elements when you need the full picture. On success it waits for the page to go quiet and reports settledMs (and settled false if the DOM was still changing at the cap), so the next read sees the result of the action.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name, for example Enter, Escape, Tab, ArrowDown, or a single printable character
exactNoFor "text=", "label=" and "placeholder=" selectors, require the whole trimmed text to equal the label instead of containing it. No effect on CSS, ref= or role= selectors.
tab_idNoArc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first.
selectorNoCSS selector, or one of: "text=Some label" (visible text, case-insensitive substring, exact matches ranked first); "ref=e12" (a ref from snapshot, re-resolved if the page re-rendered); "role=button[name="Save"]" (ARIA or implicit role, name an exact match, or name~="sav" for a substring); "label=Email" (the control a label names); "placeholder=Search"
settle_msNoAfter acting, wait until the page's DOM has been quiet for this many ms, then report settledMs. 0 skips the wait. The whole wait is capped at 1500ms; a page that never goes quiet reports settled false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.4.0
    • changedInput schema / properties / exact / description
      Previous value: -"For \"text=\" selectors, require the whole trimmed text to equal the label instead of containing it. No effect on CSS selectors."New value: +"For \"text=\", \"label=\" and \"placeholder=\" selectors, require the whole trimmed text to equal the label instead of containing it. No effect on CSS, ref= or role= selectors."
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector, or \"text=Some label\" to match on visible text (substring, exact matches ranked first)"New value: +"CSS selector, or one of: \"text=Some label\" (visible text, case-insensitive substring, exact matches ranked first); \"ref=e12\" (a ref from snapshot, re-resolved if the page re-rendered); \"role=button[name=\"Save\"]\" (ARIA or implicit role, name an exact match, or name~=\"sav\" for a substring); \"label=Email\" (the control a label names); \"placeholder=Search\""
    • addedInput schema / properties / settle_ms
      Added value: +{
      +  "default": 300,
      +  "description": "After acting, wait until the page's DOM has been quiet for this many ms, then report settledMs. 0 skips the wait. The whole wait is capped at 1500ms; a page that never goes quiet reports settled false.",
      +  "maximum": 1500,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / tab_id / description
      Previous value: -"Arc tab id from list_tabs. Omit to use this agent's current tab, falling back to whatever tab is active in Arc."New value: +"Arc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first."
  2. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Substantially exceeds the annotations: it discloses that only the page's own handlers react, that a synthetic key types no character, moves no focus and submits no form, that an unknown key name fails, and that defaultPrevented signals handler capture. It also explains the settle/quiet behavior and the settled false cap outcome, which the annotations do not cover.

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?

The action, the handler caveat and the escape hatch ("To type, use fill") are front-loaded, and the return/settle details come after. It is dense and slightly long for a single-key tool, but nearly every sentence carries distinct information and none is redundant with the schema.

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?

There is no output schema, so the description carries the return contract and does so: defaultPrevented, the minimal element identity with its fallback to query_elements, and settledMs/settled. Combined with the handler-effect caveat, an agent has everything needed to call it correctly and interpret the result.

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 100%, so the baseline is 3, but the description adds real meaning: omitting selector targets the focused element, and an unrecognized key name fails rather than silently no-oping. These are semantic behaviors the schema text does not state, lifting it above baseline.

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 states a specific verb and resource ("Dispatch a key press to an element") and immediately scopes the target ("or to the focused element when no selector is given"). It explicitly distinguishes itself from siblings by routing typing to fill and full-element inspection to query_elements, so an agent can separate press_key from type/fill/trusted_press_key without opening a 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?

It gives explicit routing ("To type, use fill") and notes query_elements when the abbreviated return is insufficient, plus tab_id guidance about not falling back to the user's tab. It stops short of clearly positioning this against the trusted_press_key sibling and vs click, so the alternative coverage is good but not exhaustive.

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