Skip to main content
Glama

Press a key

browser_press_key

Press a key or shortcut where the focus is, e.g. "Enter", "Escape", "ArrowDown" or "Control+a". A JavaScript dialog (alert, confirm, prompt, leave page) is answered with "Enter" (OK) or "Escape" (Cancel).

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

Input Schema

NameRequiredDescriptionDefault
keyYesKey or shortcut, e.g. 'Enter'.
repeatNoTimes to press it, default 1.
tab_idNoA result's tab_id.
session_idNoOnly with several sessions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare this is not read-only, not idempotent, and open-world, so the mutation risk profile is largely covered. The description adds that the key is dispatched to the currently focused element and that dialogs can be dismissed or confirmed, which is useful behavioral context. It omits other meaningful traits, such as what happens when nothing is focused or that pressing certain keys can trigger navigation.

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?

Two short sentences: the core action and its focus semantics first, then the dialog special case. Every clause carries information an agent needs, and nothing is repeated from the schema or annotations.

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 four-parameter, low-complexity input tool with no output schema, the description covers the essentials: what is pressed, where it lands, and the dialog-handling loophole. Minor gaps remain around unsupported modifier spellings and the no-focus case, but nothing blocks correct invocation.

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%, so key, repeat, tab_id and session_id are all already documented. The description adds only the shortcut syntax form ("Control+a"), which meaningfully extends the schema's bare "e.g. 'Enter'" example. Beyond that modifier convention it adds little parameter meaning, so the baseline 3 applies with slight credit for the syntax example.

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?

Uses a specific verb+resource combination: "Press a key or shortcut where the focus is." The focus qualifier is genuinely distinguishing, since it tells the agent the key goes to whatever element currently has focus, rather than to a named target as browser_type or browser_fill_form would. It stops short of naming a sibling to contrast with, so it earns a 4 rather than a 5.

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?

Provides real when-to-use guidance for a specific, non-obvious scenario: answering a JavaScript dialog (alert, confirm, prompt, leave page) with "Enter" (OK) or "Escape" (Cancel). That is actionable and would not be inferable from the name. It offers no explicit when-not or alternative routing (e.g. using browser_type to enter text into a field), so it does not reach a 5.

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.