Skip to main content
Glama

browser_press_key

Press a keyboard key (Enter, Tab, Escape, ArrowDown, etc.). Useful for submitting forms, navigating dropdowns, closing dialogs. Supports modifier keys (ctrl, alt, shift, meta). While ctrl, meta or alt is held, no character is typed.

Instructions

Press a keyboard key (Enter, Tab, Escape, ArrowDown, etc.). Useful for submitting forms, navigating dropdowns, closing dialogs. Supports modifier keys (ctrl, alt, shift, meta). While ctrl, meta or alt is held, no character is typed. With ctrl or meta (and no shift), the letters a, c, x, v, z and y are sent with Chrome's own editing command - select all, copy, cut, paste, undo, redo; z with shift is redo - including on macOS, where Chrome runs no shortcut for a synthetic key without it. The answer names the command that was sent in shortcut; landed says the page received the key, not what the command did. Paste inserts the user's real clipboard into the page, and copy and cut replace what is on it.

Input Schema

NameRequiredDescriptionDefault
altNoHold Alt key
keyYesKey to press: "Enter", "Tab", "Escape", "ArrowDown", "ArrowUp", "Backspace", "a", "1", etc.
codeNoKey code (optional, defaults to key name). E.g. "KeyA" for "a"
ctrlNoHold Ctrl/Cmd key
metaNoHold Meta (Cmd on Mac) key
shiftNoHold Shift key

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it warns that ctrl/meta/alt suppress character typing, that ctrl/meta+a/c/x/v/z/y map to Chrome's own editing commands, and that paste writes the user's real clipboard while copy/cut overwrite it. It also clarifies the return semantics of `shortcut` vs `landed`. These are side effects an agent could not infer from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening two sentences are well front-loaded, but the middle section is dense and hard to parse, particularly "including on macOS, where Chrome runs no shortcut for a synthetic key without it," which is grammatically tangled. The length is largely justified by the behavioral detail, but the wording needs tightening.

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 6-parameter, unannotated, no-output-schema tool, it covers key usage, modifier semantics, clipboard side effects, and even the shape of the response (`shortcut`, `landed`). It omits prerequisites such as whether the target element must be focused and how unrecognized keys fail.

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?

Schema coverage is 100%, so the 3 baseline applies, and the description adds real meaning beyond the schema's terse "Hold Ctrl/Cmd key" strings: it explains that no character is typed while a modifier is held and that certain modifier+letter combinations dispatch browser editing commands. It does not clarify `code` behavior beyond the schema, keeping it short of a 5.

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?

States a specific verb and resource ("Press a keyboard key") and immediately grounds it with concrete key names and the scenarios it serves: submitting forms, navigating dropdowns, closing dialogs. An agent can distinguish this keyboard-input tool from browser_fill, browser_click, or browser_select_option without opening any schema.

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?

Gives clear positive contexts ("submitting forms, navigating dropdowns, closing dialogs") that tell the agent when this is the right tool. It stops short of naming alternatives or when-not conditions (e.g., use browser_fill to enter text, browser_select_option for dropdown values), so the routing guidance is contextual rather than exhaustive.

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