Skip to main content
Glama

browser_press_key

Press a key on a ready sandbox's page, such as Enter, Tab, Escape, ArrowDown or PageDown, or a key with modifiers, such as Control+A or Shift+Tab. It answers with the page's URL and title.

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

Input Schema

NameRequiredDescriptionDefault
keyYesThe key, such as `Enter`, `Tab`, `Escape`, `Backspace`, `ArrowDown`, `PageDown` or `a`, with modifiers before it joined by `+`, such as `Control+A`, `Shift+Tab` or `Meta+L`.
sandbox_idYesThe sandbox, `sbx_…`.

Output Schema

NameRequiredDescriptionDefault
urlYesThe page's URL.
titleYesThe page's title.
snapshotNoThe page's accessibility tree as an indented outline, one element a line: `- role "name" [ref=N]`. A ref names the element to click, type into or scroll to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the response shape (URL and title) and concrete key syntax, but does not disclose side effects such as form submission, focus changes, or possible navigation triggers — which matter for a non-read-only, open-world tool.

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?

Two sentences, front-loaded with the action and followed by the return information. The key examples partially duplicate the schema, but they are compact and serve readability rather than padding.

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 two-parameter tool with full schema coverage, annotations, and an output schema, the description covers what it does, the sandbox-ready precondition, and the returned fields. The main omission is what key presses can trigger on the page, but the essential calling information is present.

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%, and the description's key examples largely restate the schema's own key description (Enter, Tab, Control+A, Shift+Tab). It adds no meaning beyond what the schema already documents, so the baseline 3 applies.

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?

The description gives a specific verb and target: pressing a key on a sandbox page, with concrete key and modifier examples. It does not differentiate itself from siblings like browser_type or browser_click, so an agent must infer that this tool sends standalone keystrokes rather than typed text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'on a ready sandbox's page' implies a precondition that the page must already be prepared, which is useful. Beyond that, there is no explicit when-to-use or when-not-to-use guidance relative to browser_type, browser_click, or browser_navigate.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources