Skip to main content
Glama

Press a key

browser_press

Press a key on the focused page element to submit forms, dismiss overlays, or scroll via keyboard without a model call.

Instructions

Press a key on the page's focused element (Enter, Escape, Tab, PageDown, ArrowDown, ...). Free — no model call. Useful to submit after browser_type, dismiss overlays, or scroll via keyboard. Returns {ok, detail, page}.

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": {
      "key": "<key>"
    },
    "name": "browser_press"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesPlaywright key name, e.g. Enter, Escape, Tab, PageDown.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose meaningful traits: the action targets the currently focused element (an important precondition), costs no model call, and returns {ok, detail, page}. It doesn't explain failure behavior when nothing is focused or that the key is dispatched immediately without further confirmation.

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 short sentences with the action front-loaded, then cost, then usage hints, then return shape. No filler; every clause conveys something the agent can act on.

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 one-parameter, non-destructive action with no output schema, the description covers what it does, when to reach for it, that it's free, and what comes back. The only notable gap is that there are no annotations, so focus/error semantics are only partially covered.

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 coverage is 100% and the schema already names the parameter as a Playwright key name with examples. The description's key list (Enter, Escape, Tab, PageDown, ArrowDown) largely repeats that, adding only the implicit point that other Playwright key syntax is accepted.

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?

States a specific action and target: pressing a key on the page's focused element, with concrete key examples. It implicitly separates itself from browser_type by referencing it as a follow-up step, though it never says outright that this is the tool for single keys while browser_type is for text.

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 three concrete usage contexts — submitting after browser_type, dismissing overlays, and keyboard scrolling — which is clear situational guidance. It stops short of explicit exclusions or stating when to prefer browser_act/browser_click instead.

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