Docs
Dashboard
SDKs / MCP serverBeta

browser_press

Press a key, a key combination, or several in a row.

Presses keys on the session's browser page: one key such as Enter, Escape or ArrowDown, a combination held together such as Control+A or Shift+Tab, or several combinations one after the other, separated by spaces, such as ctrl+a Delete. Key names are Playwright's. Common other spellings work too, such as ctrl, cmd and Return.

Inputs

NameTypeDefaultAllowed valuesDescription
sessionIdrequiredstring––The session's id, from session_create.
keysrequiredstring––The keys. Join keys that are held together with +, and separate combinations that are pressed one after the other with spaces. Names are Playwright's: Enter, Tab, ArrowDown, Control+A.

This tool works in a session with a browser. On a shell-only session (created with browser: false) it answers browser_disabled. See the three kinds of session.

sessionId is the id that session_create returned. The server keeps no default session. If that session is stopped, this tool resumes it first, as it was (a resume starts a machine again, and billing with it).

Example call

This is what an MCP client sends. You do not write it yourself: ask the model in plain words and it calls the tool.

tools/call
{  "name": "browser_press",  "arguments": {    "sessionId": "6c1f3c9e-1d2a-4f67-9b0e-1b2c3d4e5f60",    "keys": "Control+A"  }}

What it returns

One line saying which keys were pressed, or the error.

Result
Pressed Control+A

When a call fails, the result is marked as an error. Its text starts with the API’s error code, such as unauthorized or session_not_running, followed by its message.

Annotations

The server tells every client what this tool does to the world, so a client can decide what to ask you about before it runs.

AnnotationValue
titlePress keys
readOnlyHintfalse
destructiveHintfalse
openWorldHinttrue

Good to know

  • The session machines run Linux: select-all is Control+A there (ControlOrMeta+A works everywhere).
  • The keys go to the browser page only, never to the machine's desktop.

The same thing with the API

EndpointReference
POST /v1/sessions/{id}/browser/actionsRun browser actions

These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.