Skip to main content
Glama

press_key

Destructive

Send a Playwright keyboard key to a selected element or the active page to automate typing, shortcuts, or navigation in Typora.

Instructions

Press a Playwright key on a selected element or the active page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
refNo
indexNo
selectorNo
targetIdNoRenderer targetId from typora_status; required when no single window is focused
snapshotIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds almost nothing beyond that: it does not say what keypresses can trigger (form submits, destructive shortcuts), whether an element must be focused first, or how targetId/window focus interacts. With annotations carrying the safety signal, the description contributes minimal behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no wasted words. It is arguably undersized for a 6-parameter destructive tool, but as written it is tight and readable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, 6-parameter tool with 17% schema coverage and no output schema, one sentence leaves key gaps: target selection semantics, key format, and focus/window requirements are all unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 17% (just targetId documented) across 6 parameters, so the description must compensate and does not. It says nothing about key syntax/format, or what ref, index, selector, and snapshotId do, nor how they select the press target.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (press) and resource (Playwright key) with scope (selected element or active page), which distinguishes it from siblings like click and type. It is clear but does not explicitly name those siblings or contrast behavior with them.

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

Usage Guidelines2/5

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

No guidance on when to use this versus click, type, or send_cdp_command. No prerequisites, no exclusions, no alternatives named; the agent must infer usage from the name alone.

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