Skip to main content
Glama

browser_key_press

Presses specified keyboard keys in an automated browser to simulate user input, trigger shortcuts, or submit forms during Selenium web testing.

Instructions

Press a key on the keyboard

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_key_press"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesKey to press (e.g., 'Enter', 'Tab', 'a', etc.)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
  4. First observed

TDQS

C2.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden and discloses almost nothing. It does not say whether modifier combinations (e.g., 'Control+a') are supported, whether special key names are required, whether events fire on the focused element or document, or what happens on an invalid key.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is front-loaded and free of padding, but its brevity is achieved by omitting necessary information rather than by efficient phrasing. It is neither wordy nor informative.

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?

For a one-parameter browser automation tool with no annotations and no output schema, the description should cover focus target, modifier support, and event behavior. None of these are present, leaving meaningful gaps for an agent trying to invoke it correctly.

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 coverage is 100% and the schema's key property already documents format with examples ('Enter', 'Tab', 'a'). The description adds no meaning beyond that, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a verb and resource ("Press a key") and adds "on the keyboard," so the basic action is clear. However, it largely restates the tool name and does not clarify whether the press targets the currently focused element, a page-level handler, or a specific element, nor how it differs from sibling interaction tools like browser_click.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives. Nothing tells the agent that this is for keyboard shortcuts, Tab navigation, or form submission after focusing an element, nor are any prerequisites (e.g., an element must be focused first) mentioned.

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