Skip to main content
Glama
andresolbach

nodriver-mcp-server

Press key

press_key

Send key presses and keyboard shortcuts to the focused page element. Trigger actions like Enter, Tab, Escape, or Control+A after clicking or filling the target.

Instructions

Send a key press or keyboard shortcut to the page.

Goes to whatever currently holds focus, so click or fill the target element first — with nothing focused the key lands on the document body.

Modifiers are held around the main key with the proper modifier bitmask, so real chords such as Control+A or Control+Shift+R register as shortcuts instead of arriving as unrelated key presses.

For entering text use fill (replaces the field) or type_text (appends to it); this tool is for single keys and shortcuts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesA key or chord, e.g. "Enter", "Tab", "Escape", "ArrowDown", "a", "Control+A" or "Control+Shift+R". Modifiers are Control, Shift, Alt and Meta, joined with +. Named keys: Enter, Tab, Backspace, Delete, Escape, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, PageUp, PageDown, Space. Any single character works as itself.
include_snapshotNoAppend a fresh page snapshot to the response. Worth it when this action changes the page and take_snapshot would be your next call anyway — it saves a round trip, at the cost of a much larger response.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations indicate readOnlyHint=false and openWorldHint=true, but the description adds critical behavioral context: keys go to the currently focused element, with nothing focused they land on the document body; modifiers are combined with the proper bitmask so chords work. This goes beyond the annotation flags, though it doesn't cover every possible side effect (e.g., navigation or page changes).

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?

Three tightly packed paragraphs: purpose, focus behavior, and alternatives. Every sentence earns its place, no fluff, and the most important facts are front-loaded. Structure is clear and scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a keyboard tool with focus and modifier complexity, the description fully covers usage context, preconditions, and alternative tools. The output schema exists and the parameter schema is rich, so the description need not repeat return formats. No significant gaps remain.

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 input schema provides 100% coverage with detailed descriptions for both parameters (key examples and include_snapshot's purpose). The description adds a useful detail about modifier bitmasks, which relates to the key parameter, but the schema already carries the full semantic load. Meets the baseline for high schema coverage.

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 opens with 'Send a key press or keyboard shortcut to the page,' which is a specific verb+resource statement. It clearly distinguishes from sibling text-entry tools (fill, type_text) by stating 'this tool is for single keys and shortcuts.' Purpose is unambiguous and differentiated.

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

Usage Guidelines5/5

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

The description explicitly explains when to use it ('click or fill the target element first') and provides clear exclusions: 'For entering text use fill (replaces the field) or type_text (appends to it).' This gives actionable guidance on focus requirements and alternative tool selection for text entry.

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/andresolbach/nodriver-mcp-server'

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