Skip to main content
Glama

browser_press_key

Destructive

Simulate keyboard key presses in a browser controlled by AI agents. Use to navigate, type characters, or trigger shortcuts.

Instructions

Press a key on the keyboard

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesName of the key to press or a character to generate, such as `ArrowLeft` or `a`
Behavior3/5

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

Annotations already declare `destructiveHint: true` and `openWorldHint: true`, which signal state modification and external interaction. The description adds no additional behavioral context beyond what annotations provide. It does not mention that the key press targets the currently focused element, triggers events, or could be used for keyboard shortcuts. With annotations carrying the safety profile, the description adds minimal value, but does not contradict the annotations.

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 description is a single sentence of 5 words, which is concise and front-loaded. There is no wasted verbiage. However, it is arguably too terse; it could include more context without becoming verbose (e.g., 'on the focused element'). The conciseness is good but not optimal for the tool's context.

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?

Given the simple tool (1 parameter, no output schema, annotations present), the description is insufficient. It does not explain the effect (e.g., triggers a keydown/keyup event on the focused element), how it interacts with browser state, or the scope of the key press. The schema partially fills gaps, but the description alone does not provide enough context for an agent to understand the full behavior. A more complete description would mention focus dependency and event generation.

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?

The parameter `key` is fully described in the input schema (100% coverage) with details about key names or characters. The description 'Press a key on the keyboard' does not add any meaning beyond the schema. Following the baseline rule for high coverage, a score of 3 is appropriate since the description does not repeat or enhance the parameter semantics.

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

Purpose4/5

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

The description 'Press a key on the keyboard' clearly states the action (press) and the resource (key on the keyboard). It is specific and matches the tool name. However, it does not differentiate from sibling tools like `browser_type` (which types text sequences) or `browser_click` (mouse click), leaving ambiguity about when a single key press is intended versus other input methods. The purpose is clear but lacks sibling distinction.

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?

The description provides no guidance on when to use this tool versus alternatives. With 65 sibling tools including `browser_type`, `browser_mouse_click_xy`, and keyboard-related actions, an agent would have no contextual hints about preferring `browser_press_key` over `browser_type` for a single character, or over `browser_handle_dialog` for Enter/Escape. No when-to-use or when-not-to-use information is given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pelag-Michael/Chrome-for-AI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server