Skip to main content
Glama

browser_press_key

Read-onlyIdempotent

Press a keyboard key (e.g., 'Enter', 'Tab', 'Escape', 'ArrowDown') or a single character. Shortcuts with modifiers are written with '+': 'Control+A', 'Shift+Tab', 'Control+Shift+ArrowLeft', 'Meta+Enter'. Optional ref focuses an element first — aria-ref token from browser.snapshot ('e7') or a CSS selector (frame = CSS selector of the it lives in).

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

Input Schema

NameRequiredDescriptionDefault
keyYes
refNo
frameNo
page_idYes
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / frame
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Frame"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  3. Added
  4. Removed
  5. Added
  6. Removed
  7. Added
  8. Removed
  9. Added
  10. Removed
  11. 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, idempotentHint, and destructiveHint=false, so the safety profile is covered by structured data. The description does add genuine behavior beyond that: an optional `ref` focuses an element before the key is sent, and `frame` scopes the selector to an iframe. It stops short of covering what happens when the ref is not found, whether it waits for a render, or what the call returns.

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?

The key-format rule is front-loaded and the parameter notes follow logically in one compact paragraph. The four shortcut examples ('Control+A', 'Shift+Tab', 'Control+Shift+ArrowLeft', 'Meta+Enter') are slightly more than needed and could be trimmed without losing information.

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

Completeness3/5

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

There is no output schema, so return behavior falls to the description, which says nothing about it, nor about `page_id`. For a tool with five parameters and modest schema coverage, key syntax and ref/frame semantics are adequately covered, but failure modes and post-press behavior are not.

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?

With only 20% schema description coverage, the description carries most of the burden and mostly succeeds: it explains key syntax (single character vs. modifier chains joined by '+'), the accepted forms of `ref` (aria-ref token like 'e7' from browser.snapshot, or a CSS selector), and the meaning of `frame` (CSS selector of the containing iframe). Only `page_id` is left entirely unexplained.

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 opens with a specific verb and resource ('Press a keyboard key ... or a single character') and gives concrete key examples, so the action is unambiguous. It does not, however, distinguish this from the sibling browser_keyboard (likely raw key down/up) or explain why one would press a key here rather than use browser_fill for text entry.

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?

Usage is implied by the examples ('Enter', 'Tab', 'Control+A'), so an agent knows what kinds of inputs are valid, but there is no explicit when-to-use/when-not guidance and no routing to alternatives such as browser_keyboard or browser_fill. The reader must infer the boundary from the sibling names alone.

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.