Skip to main content
Glama

browser_press_key

Simulate keyboard key presses in a real browser for automation tasks. Press single keys like Enter or Tab, or use modifiers for combinations like Ctrl+A.

Instructions

Press a keyboard key or combination (Enter, Escape, Tab, ArrowDown, etc). Supports modifiers like Ctrl+A, Cmd+C.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name (e.g. "Enter", "Escape", "Tab", "ArrowDown", "a")
modifiersNoModifier keys to hold
refNoElement ref to focus before pressing
selectorNoCSS selector to focus before pressing
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions support for key combinations and modifiers, but fails to describe critical behaviors such as whether this action triggers page navigation, form submissions, or other side effects; whether it requires a focused element; or what happens on error. For a browser interaction tool with zero annotation coverage, this leaves significant gaps in understanding its operational impact.

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 extremely concise—two sentences that directly state the tool's function and its key features (supported keys and modifiers). Every word earns its place with no redundancy or fluff, making it easy to parse and understand quickly.

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 complexity of a browser interaction tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks information on behavioral outcomes (e.g., what the tool returns, error conditions), prerequisites (e.g., needing an active browser session), and how it integrates with sibling tools. For a tool that could have significant side effects, this leaves too much unspecified.

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 description coverage is 100%, so the schema already fully documents all four parameters (key, modifiers, ref, selector). The description adds minimal value beyond the schema by listing example keys (e.g., 'Enter', 'Escape') and mentioning modifiers like 'Ctrl+A', but doesn't provide additional syntax, format details, or usage context for the parameters. This meets the baseline of 3 when the schema does the heavy lifting.

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 clearly states the action ('Press a keyboard key or combination') and the resource (keyboard input in a browser context), making the purpose immediately understandable. It distinguishes itself from siblings like browser_click or browser_type by focusing specifically on key presses rather than mouse clicks or text typing, though it doesn't explicitly name these alternatives.

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

Usage Guidelines3/5

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

The description implies usage for keyboard interactions in a browser, but provides no explicit guidance on when to use this tool versus alternatives like browser_type (for text input) or browser_click (for mouse actions). It mentions supported keys and modifiers, which gives some contextual hint, but lacks clear when/when-not directives or named alternatives.

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/ofershap/real-browser-mcp'

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