Skip to main content
Glama

press_key

Send keyboard shortcuts, navigation keys, or special key combinations when other input methods cannot be used. Trigger actions like Ctrl+A or Enter directly on a page.

Instructions

Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesA key or a combination (e.g., "Enter", "Control+A", "Control++", "Control+Shift+R"). Modifiers: Control, Shift, Alt, Meta
pageIdYesTargets a specific page by ID.
includeSnapshotNoWhether to include a snapshot in the response. Default is false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior2/5

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

With only readOnlyHint=false in annotations, the description carries the burden of behavioral disclosure, but it only restates the basic operation ('Press a key'). It does not describe side effects, focus requirements, whether navigation is triggered, or what happens when a shortcut is invalid. This adds little beyond the tool name and annotation.

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 two concise sentences with no filler. It front-loads the core action, then immediately provides selection guidance and examples, making it easy for an agent to parse quickly.

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?

The tool is relatively simple and the schema covers all parameters, but the description omits any information about response behavior, failure modes, or prerequisites such as page focus. Since there is no output schema, a brief note about the response would improve completeness.

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 the input schema already documents all parameters, including key syntax and pageId. The description adds no parameter-specific meaning beyond the usage context, so the baseline 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 uses a specific verb ('Press') with a clear resource ('a key or key combination') and distinguishes the tool from alternative input methods like fill(). The examples of keyboard shortcuts, navigation keys, and special key combinations make the tool's purpose unmistakable even among many sibling tools.

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 states when to use this tool: when other input methods like fill() cannot be used, and gives concrete examples. It does not explicitly enumerate exclusions or name other sibling input tools like click or type_text, but the guidance is clear enough to route an agent correctly.

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