Skip to main content
Glama

press_key

Simulate keyboard shortcuts, navigation keys, or special key combinations when standard input methods fail. Target a specific page by ID to trigger key-based interactions.

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

A4/5.0
Behavior3/5

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

readOnlyHint=false already tells the agent this mutates page state, so the safety profile is covered structurally. The description adds the useful 'fallback when fill() cannot be used' framing but says nothing about focus requirements, whether the key fires immediately, or what a failed press looks like. Some added value, but thin beyond annotations.

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, zero filler, with the core action front-loaded before the usage condition. Every clause earns its place.

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 3-parameter action tool with no output schema and full schema coverage, the description plus structured fields give enough to invoke it correctly. The only missing nuance is what the response contains when includeSnapshot is true, which the schema partially covers.

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 syntax, pageId targeting, and includeSnapshot defaults are all documented in the schema itself. The description adds no format or constraint detail beyond that, which is the correct baseline when the schema does the heavy lifting.

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?

States a specific verb+resource ('Press a key or key combination') and immediately distinguishes the tool from alternative input paths like fill(). An agent can identify this as the keyboard-input primitive without opening the schema.

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?

Gives explicit trigger conditions in parentheses (keyboard shortcuts, navigation keys, special combinations) and names fill() as the alternative to fall back from. It does not mention the closely related type_text or hover/click siblings, so the routing is clear but not exhaustive.

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