Skip to main content
Glama

browser_press_key

Destructive

Press keyboard keys like Enter, Tab, Escape, or shortcuts on the focused browser element to trigger actions, navigate forms, or interact with web pages.

Instructions

Press a key on whatever has focus: "Enter", "Tab", "Escape", "ArrowDown", "Control+a", or a single character.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
browserNoDefaults to `main`; `support` is the helper beside it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.68.0
    • addedInput schema / properties / browser / description
      Added value: +"Defaults to `main`; `support` is the helper beside it."
  2. First observedv0.43.0

TDQS

A4.2/5.0
Behavior3/5

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

The annotations already signal mutability and destructive potential (destructiveHint=true, readOnlyHint=false). The description adds the important behavioral qualifier 'whatever has focus' and lists accepted key forms, but it does not disclose side effects like form submission from Enter or other shortcut-triggered actions. With annotations carrying the safety profile, this is adequate but not rich.

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 one compact, front-loaded sentence that names the action and target, then provides a scannable list of examples. Every element earns its place; there is no filler or repetition.

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 simple two-parameter tool with one required key and an optional browser, the description, schema, and annotations together provide enough to invoke it correctly. An explicit note about destructive side effects would improve completeness, but the destructiveHint annotation already covers the risk.

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?

The schema only documents the browser parameter, leaving the required key parameter undocumented. The description compensates by enumerating accepted special keys, showing modifier syntax like 'Control+a', and allowing single characters. This adds meaning beyond the bare string type in the schema.

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 action ('Press a key'), identifies the target ('on whatever has focus'), and enumerates concrete valid inputs such as 'Enter', 'Tab', and 'Control+a'. This clearly differentiates it from sibling tools like browser_type or browser_click, which handle text entry and pointer actions.

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?

The description gives clear context: use this when you need to send a discrete key press or keyboard shortcut to the currently focused element. It does not explicitly contrast with browser_type for multi-character text input, but the examples and focus qualifier make the intended usage reasonably unambiguous.

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