Press key
browser_press_keyPress a keyboard key in the delegated tab. Supported keys: letters, digits, space, Enter, Tab, Escape, Backspace, Delete, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, PageUp, PageDown, Insert, F1–F12, and one other character such as ü. Distinct modifiers may prefix one key in any order (Shift+Control+ArrowLeft, Control+Shift+A, Control+Alt+Delete, Meta+c). Control and Ctrl are the same modifier. A repeated modifier is INVALID_ARGUMENT ("Duplicate modifier: Shift", "Duplicate modifier: Control"). An unknown token is INVALID_ARGUMENT ("Unknown key: Nope"). An empty part ("Shift+", "+A") or a modifier with no key (Shift, Shift+Control) is INVALID_ARGUMENT ("Chord is missing a key"). Those checks run before the tab is touched. Modifier chords do not insert text. elementId requires observationId (INVALID_ARGUMENT otherwise). Without elementId, the key goes to the focused element and the result includes target: { tag, id? }. A successful browser_type leaves focus on that field, so the next key without elementId reaches it. Tab and Shift+Tab move focus when the page does not cancel the key. A password, current-password, new-password, one-time-code, or cc-number field returns HUMAN_INPUT_REQUIRED for printable characters, Backspace, Delete, and Insert, and does not change the field. Tab, Enter, and Escape are still sent. ArrowUp and ArrowDown change input[type=number]. Text a number, date, time, or color input cannot hold returns INVALID_INPUT_VALUE and does not set the value. A non-ASCII character is inserted as text only on a field the agent may edit. Events are not isTrusted. Key presses are paced; RATE_LIMITED means wait retryAfterMs. On a sensitive site, press_key returns APPROVAL_REQUIRED with approvalId. After Deny, the next press_key returns APPROVAL_DENIED with that approvalId once, even with a new element id. A later key may ask again. After Approve, the completed success includes that same approvalId and approved: true. A key that did not need approval does not include approvalId.
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": {
"sessionId": "<sessionId>",
"key": "<key>"
},
"name": "browser_press_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| elementId | No | ||
| sessionId | Yes | ||
| observationId | No | ||
| idempotencyKey | No | A key replays the original result only within ~60 seconds of the first call, only for the same Mcp-Session-Id, the same credential (API key or OAuth token), the same browser session, and the same tool. After the window, or under a different session/credential/tool, the call executes and bills normally. Reusing a key with different arguments returns IDEMPOTENCY_KEY_REUSED and is not executed or billed. Refusals (e.g. NO_HISTORY_ENTRY) are not cached, so the same key re-executes once state changes. A key passed in _meta is ignored. |