Skip to main content
Glama
mya11yreport

mya11yreport-mcp

by mya11yreport

Press key

press_key

Send key presses and keyboard chords to a target or currently focused element to enable keyboard navigation, form submission, dialog dismissal, and keyboard-only accessibility testing.

Instructions

Presses a key or chord (Enter, Tab, Escape, arrows, Space, Shift+Tab, Control+A, ...) in the session page. With a target, focuses that element and sends the key to it; without one, sends the key to the currently focused element. Use it for keyboard navigation, submitting a form with Enter, closing a dialog with Escape, or exercising keyboard-only interactions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey or chord to press, using Playwright key names: "Enter", "Tab", "Escape", "ArrowDown", "Space", "Shift+Tab", "Control+A", "Meta+Enter", "F1", "Backspace", "PageDown". To type a literal character use "type" instead.
targetNoOptional element to focus first and send the key to (Playwright locator.press). Omit to send the key to the page's currently focused element (page.keyboard.press).
sessionIdYesSession id returned by start_session. Required on every stateful tool call.
timeoutMsNoAction timeout in milliseconds when a target is given (default 10000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It clearly explains the two operating modes (with target vs. without) and that it sends the key to the focused element. It doesn't mention edge cases like waiting or navigation side effects, but for a simple key press this is adequate.

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 well-structured sentences, front-loaded with the primary action and followed by mode behavior and use cases. No wasted words, and the key information is immediately visible.

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 main behavior, both modes, and typical use cases. It does not discuss return values (no output schema exists, and it's an action tool), which is acceptable. The required sessionId is in the schema, so completeness is 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%, so the schema already documents all parameters in detail. The description's explanation of target behavior largely mirrors the schema's target description, adding no new semantic value. 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 clearly states it presses a key or chord in the session page, listing specific examples and explicitly distinguishing from the 'type' tool for literal characters. This makes the purpose unambiguous and separates it from the sibling 'type' tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides explicit use cases (keyboard navigation, submitting forms, closing dialogs) and directly says to use 'type' for literal characters, giving a clear alternative. This is strong guidance on when and when not to use it.

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