Skip to main content
Glama

press_key

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).

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

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. Changed1 schema field changedv0.1.1
    • changedInput schema / additionalProperties
      Previous value: -{}New value: +false
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, so the agent knows this is a mutating action. The description adds some context by explaining use cases (shortcuts, navigation), but it does not disclose behavioral details such as whether the key press requires prior page focus, what happens on invalid keys, or any side effects. With annotations present, this is adequate but not rich.

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, front-loaded with the core action and immediately followed by a usage condition. No wasted words; every sentence adds value (purpose and when-to-use).

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 tool with full schema coverage and a single annotation (readOnlyHint=false), the description covers purpose and primary usage well. It could mention prerequisites (e.g., a page must be active) or expected outcomes, but it is sufficient for correct invocation given the structured fields.

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 all parameters are fully documented in the input schema. The description repeats the concept of 'key or key combination' without adding syntax or usage details beyond what the schema already provides. Baseline 3 is appropriate when the schema carries the full parameter documentation.

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) and resource (key or key combination), and explicitly distinguishes the tool from sibling fill() by naming a condition when fill() cannot be used. An agent can immediately understand the tool's unique role among input methods.

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 gives clear context for when to use this tool: 'when other input methods like fill() cannot be used' and lists examples (keyboard shortcuts, navigation keys, special combinations). It does not explicitly compare to other siblings like type_text, but the guidance is sufficient without being misleading.

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