Skip to main content
Glama
playwright-mcp-router

playwright-mcp-router

by huangzt

browser_press_key

Destructive

Simulate a keyboard key press, such as ArrowLeft or a character, in an isolated browser session to trigger shortcuts, navigate pages, or type input.

Instructions

Press a key on the keyboard

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session": "<session>",
      "key": "<key>"
    },
    "name": "browser_press_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesName of the key to press or a character to generate, such as `ArrowLeft` or `a`
colorNoOptional Chrome tab group color override for a newly created session.
accountNoChrome account profile to use (defaults to 'default'). Configured accounts: 'default' (Isolated Browser).default
sessionYesRequired isolated session name (also displayed as the Chrome tab group title), e.g. "T1867-api-debug" or "home-css". Use a unique, descriptive task name per conversation so concurrent agents never hijack each other's active tab.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnly=false, destructiveHint=true and openWorldHint=true, so the safety bar is lower, but the description adds nothing beyond that: it doesn't say the key is dispatched to the currently focused element, that characters can be typed as well as named keys, or what a failure looks like. For a mutation-class tool with real destructive potential, this is thin.

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?

One short, front-loaded sentence with zero wasted words. Brevity here comes at the cost of content rather than padding, which is judged elsewhere.

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?

The tool is simple and the schema is richly documented, but the description omits the one thing an agent most needs: where the keypress lands (focused element in the given session) and what side effects a destructive keypress can have. For a destructive-flagged browser action, a single sentence is not complete.

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%, including a detailed key format example and a full explanation of the required session isolation name, so the schema carries the parameter burden. The description adds no parameter meaning of its own, which is the baseline-3 case.

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?

A clear specific verb+resource ('Press a key on the keyboard') that leaves no ambiguity about the basic action. It does not, however, differentiate itself from nearby siblings like browser_click, browser_hover, or browser_fill_form, nor say whether the key goes to the focused element or a targeted one.

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?

No when-to-use guidance and no alternatives named. An agent must infer on its own that this is for keyboard events (shortcuts, Enter/Escape, single characters) rather than text entry, which browser_fill_form likely covers.

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