Skip to main content
Glama

press

Sends keyboard shortcuts such as Enter, Escape, Control+a, or Shift+Tab to a browser tab, optionally focusing a specific element first.

Instructions

Press keys: "Enter", "Escape", "Control+a", "Shift+Tab". Optional ref to focus first.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "press"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNo
refNoElement ref from the latest snapshot, e.g. e12 or f1e5
tabNoTab id. Default: your own target tab (each agent session gets its own)
findNoInstead of ref: the role and name as the snapshot shows them, e.g. {role:"button", name:"Save"}; nth:2 picks the second match. Survives reloads and new sessions, so recipes use it
keysNo
browserNochrome, edge, ... (only when several browsers are connected)
snapshotNoDefault returns a diff of what changed. true = full snapshot, false = nothing

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It does not explain whether key presses are dispatched to the page, what happens on failure, whether actions wait, or what the result contains, leaving important behavioral traits undisclosed.

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 one tightly structured sentence with concrete examples and no wasted wording. The key behavior is front-loaded, followed by the optional ref focusing behavior.

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

Completeness2/5

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

This is a seven-parameter input tool with no annotations and no output schema. The description is too sparse to be complete: it does not explain return behavior, error cases, key-versus-keys semantics, or how snapshot output is affected by pressing keys.

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 coverage is 71%, so the schema already documents several parameters such as `ref`, `tab`, `find`, `browser`, and `snapshot`. The description adds useful meaning for `key` through examples and clarifies that `ref` focuses the element first, but it does not explain `keys`, the relationship between `key` and `keys`, or several other parameters.

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 uses a specific verb and resource, "Press keys," and gives concrete examples such as "Enter," "Escape," and "Control+a." It does not explicitly distinguish this tool from the sibling `type` tool, which is the main missing clarity point.

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

Usage Guidelines2/5

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

The description gives examples of keys but does not state when to use `press` rather than `type`, `click`, or `select`. It mentions the optional ref behavior for focusing, but provides no explicit alternatives or exclusions.

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