Skip to main content
Glama

Press key in browser

browser_press_key
Destructive

Press Enter, Tab, Escape, or Backspace in an active browser tab to submit forms, move between fields, or exit dialogs. Verify current page state before pressing Backspace to avoid unintended deletions.

Instructions

Press Enter, Tab, Escape or Backspace in one of the agent's tabs, for example Enter to submit a form after browser_type. Only these four keys are supported; use browser_type for characters. Enter can submit forms and Backspace deletes, so check the page state with browser_snapshot first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey to press
tab_idYestab_id of one of the agent's tabs, from browser_open_tab or browser_list_tabs
session_idNoStable task or thread ID. Pass the same value on every browser call for this task. Different IDs isolate tabs and cleanup within one MCP process. Omit for the default process session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.3
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Stable task or thread ID. Pass the same value on every browser call for this task. Different IDs isolate tabs and cleanup within one MCP process. Omit for the default process session.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.3.1
    • addedInput schema / properties / key / description
      Added value: +"Key to press"
    • addedInput schema / properties / tab_id / description
      Added value: +"tab_id of one of the agent's tabs, from browser_open_tab or browser_list_tabs"
  3. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, and the description adds meaningful context beyond that: Enter can submit forms and Backspace deletes, so the agent is told to inspect the page first. This helps the agent understand what destructive side effects can occur rather than just knowing that destruction is possible. It does not detail Tab or Escape behavior, but the most important risks are disclosed.

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?

The description is two sentences with no filler. It front-loads the core purpose and supported keys, then provides the most important usage warning and alternative. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter tool with a fully described schema and destructive annotations, the description covers all essential decision points: which keys are allowed, what they do, when to use browser_type instead, and when to snapshot first. No critical information for invocation appears to be missing.

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 description coverage is 100%, so the baseline is 3. The description adds semantic value by explaining how the key parameter behaves in practice (e.g., Enter submits forms, Backspace deletes) and by clarifying that browser_type is the alternative for characters. This goes beyond the enum and helps the agent choose the correct parameter value.

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?

The description names a specific verb ('Press') and resource ('one of the agent's tabs'), and explicitly lists the four supported keys. It also distinguishes itself from browser_type by saying 'use browser_type for characters' and from browser_snapshot by recommending it as a pre-check. This leaves no ambiguity about what the tool does.

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?

It gives clear guidance: only Enter, Tab, Escape, and Backspace are supported, and browser_type should be used for characters. It also advises checking page state with browser_snapshot before destructive keys. It does not explicitly contrast with the sibling 'press_key' tool, though the browser-tab context and browser-specific name largely cover that gap.

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