Skip to main content
Glama

browser_press

Simulates trusted keyboard key presses and combos in the focused browser element to submit forms, navigate fields, close dialogs, or drive keyboard-driven UIs.

Instructions

Press a key or key combo in the focused element, delivered as trusted CDP keyboard events with correct virtual key codes. Single keys: "enter" (submit forms), "tab" (next field), "escape" (close dialogs), "backspace", "delete", "arrowup/arrowdown/arrowleft/arrowright", "home", "end", "pageup", "pagedown", "space". Combos: "ctrl+a" (select all), "ctrl+c", "ctrl+v", "ctrl+shift+t", "alt+arrowdown". Function keys: "f5", "f12". Use after browser_type to submit a form, or to drive keyboard-driven UIs. Returns the post-press state diff + network requests.

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": {
      "key": "<key>"
    },
    "name": "browser_press"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesKey or plus-separated combo: named keys (enter, tab, escape, backspace, delete, arrowup, arrowdown, arrowleft, arrowright, home, end, pageup, pagedown, space), single characters, function keys (f1-f12), or modifier combos (ctrl/alt/shift/meta + key, e.g. "ctrl+a")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • addedInput schema / properties / key / description
      Added value: +"Key or plus-separated combo: named keys (enter, tab, escape, backspace, delete, arrowup, arrowdown, arrowleft, arrowright, home, end, pageup, pagedown, space), single characters, function keys (f1-f12), or modifier combos (ctrl/alt/shift/meta + key, e.g. \"ctrl+a\")"
  2. First observedv0.1.0

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 real work: it discloses that events are trusted CDP events with correct virtual key codes, which matters for pages that check isTrusted, and it discloses the return payload (post-press state diff plus network requests) despite there being no output schema. It does not say what happens when no element is focused or how focus failures surface, which is the remaining gap.

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 core purpose is front-loaded in the first clause, and the usage rule and return value are placed after the key catalogue. The catalogue is somewhat redundant with the schema's key list, but each example carries a purpose hint, so the length is mostly earned.

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 tool with no annotations and no output schema, the description covers purpose, key vocabulary, usage sequencing, and return shape. The one thing an agent still has to infer is how the focused element gets focused and how focus-related failures are reported.

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 100%, so the baseline is 3, and the description goes beyond it by attaching intent to specific keys ("enter" submits forms, "tab" moves to the next field, "ctrl+a" selects all, "escape" closes dialogs), which helps an agent choose the right key rather than just format it. The named-key list itself largely restates the schema's own enumeration, which caps it below 5.

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 (press) and resource (a key or key combo) and pins down the target as the focused element, plus the delivery mechanism (trusted CDP keyboard events with correct virtual key codes). That distinguishes it cleanly from browser_type, which enters text rather than dispatching discrete keys.

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?

"Use after browser_type to submit a form, or to drive keyboard-driven UIs" gives an explicit sequencing rule and names the sibling it follows. It stops short of stating when not to reach for it (e.g. prefer browser_click for direct navigation instead of tab/enter chains), so it is clear context without exclusions.

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