Skip to main content
Glama

press

Send a key to the current page and identify the focused element afterwards, enabling tests of keyboard navigation, form submission, and dialog closing.

Instructions

Press a key on the current page and report which element holds the focus afterwards. Use it to test keyboard access, to submit a form with Enter or to close a dialog with Escape.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name as Playwright writes it, such as Tab, Shift+Tab, Enter, Escape, ArrowDown or Space.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.6
    • addedInput schema / properties / key / description
      Added value: +"Key name as Playwright writes it, such as Tab, Shift+Tab, Enter, Escape, ArrowDown or Space."
  2. First observedv0.4.5

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool physically presses a key, may trigger side effects like form submission or dialog dismissal, and then reports the focused element. This gives a meaningful behavioral picture beyond the raw schema.

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 sentences with no filler: the first states the action and result, the second lists practical use cases. Everything earns its place and the most important information is front-loaded.

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?

The description covers the action, the outcome, and common usage scenarios. It does not explain edge cases such as navigation or page changes after the key press, but for a simple keyboard tool with a fully documented single parameter, the provided context is largely sufficient.

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 100%, with the 'key' parameter already described as a Playwright key name with examples. The description does not add new parameter-level detail, so the baseline of 3 is appropriate.

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 states a specific verb ('press a key'), a specific resource ('the current page'), and a clear observable outcome ('report which element holds the focus afterwards'). This clearly distinguishes it from sibling tools like click, fill, select, and check.

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?

The description explicitly gives three concrete use cases: testing keyboard access, submitting a form with Enter, and closing a dialog with Escape. It does not explicitly state when not to use it or name alternative tools, but the context is clear enough for an agent to select it appropriately.

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