Skip to main content
Glama

Press key

press

Press keyboard keys like Enter, Tab, or Escape on a web page element. Target a specific element with a selector or the currently focused element.

Instructions

Press a keyboard key such as 'Enter' (submit a form), 'Tab', or 'Escape'. With selector the key is sent to that element; without it, to the focused element. Supports Playwright key syntax (e.g. 'Control+A').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey to press, e.g. 'Enter', 'Tab', 'Escape', 'Control+A'
selectorNoElement to focus + press against; omit to press the focused element
Behavior4/5

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

Annotations already indicate the tool is not read-only and not destructive. The description adds behavior details: key can be sent to a specific element via selector or to the focused element, and supports Playwright key syntax for combinations like 'Control+A'.

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 only, each serving a purpose. The first sentence states the action and gives examples, the second explains the selector behavior. No wasted words.

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 simple 2-parameter tool with annotations and no output schema, the description covers the core behavior and key syntax. It doesn't mention error handling or return values, but those are not critical for this tool.

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?

Schema coverage is 100%, but the description adds value by providing examples (e.g., 'Enter', 'Tab', 'Escape', 'Control+A') and explaining the conditional behavior of the selector parameter. This goes beyond the schema's bare parameter descriptions.

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 clearly states the tool's purpose: pressing a keyboard key like 'Enter', 'Tab', or 'Escape'. It provides specific examples and distinguishes from sibling tools like 'type' (for text) and 'click' (for mouse actions).

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 explains when to use the tool (submit a form, navigate with Tab, etc.) and how to target elements via selector or focused element. It does not explicitly state when not to use it, but the context and sibling names provide sufficient guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MatinMHF/visual-inspector-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server