Skip to main content
Glama

press_key

Send real key events (Enter, Tab, Escape, arrows) to a focused element or selector, triggering framework handlers for shortcuts and navigation.

Instructions

Send a key to the focused element (or to selector, focusing it first) as a real keydown/keypress/keyup sequence, so framework handlers fire. For typing a value use type_text; this is for Enter, Tab, Escape, arrows and shortcuts. Not idempotent: two calls send the key twice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
altNoHold Alt
keyYese.g. "Enter", "Escape", "Tab", "ArrowDown"
ctrlNoHold Control
metaNoHold Meta (Command/Windows)
shiftNoHold Shift
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
frame_idNoTarget iframe id from get_frames; omitted = main frame
selectorNoTarget (default: activeElement)
Behavior4/5

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

Annotations indicate non-idempotent (idempotentHint=false) and non-destructive. Description adds that it simulates a real key sequence and focuses the element if a selector is provided. Does not contradict annotations.

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?

Two sentences, each serving a clear purpose: first explains the action and effect, second provides usage guidance and idempotency warning. No redundant words.

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?

Covers key aspects: what the tool does, key sequence, focusing behavior, example keys, and idempotency. No output schema, so return values are not needed. Sufficient for an 8-parameter tool.

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 covers all 8 parameters with descriptions (100% coverage). Description only adds context about focusing when a selector is used, which is already implied. Little additional value beyond 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 clearly states the action ('Send a key to the focused element') and specifies the key sequence (keydown/keypress/keyup). It distinguishes from type_text for typing values and gives examples like Enter, Tab, Escape, arrows, and shortcuts.

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?

Explicitly tells when to use (Enter, Tab, Escape, arrows, shortcuts) and when not ('For typing a value use type_text'). Also warns about non-idempotency: 'Not idempotent: two calls send the key twice'.

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/frsorrentino/chrome-bridge'

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