Skip to main content
Glama
hooplus1ce

DrissionPage-MCP

by hooplus1ce

按键

press_key

Press and release a single keyboard key (real keyboard event) such as ENTER, ESC, TAB, arrow keys. Specify the key name and optional tab ID to target a specific browser tab.

Instructions

按下并松开一个键盘按键(真实键盘事件),如 ENTER、ESC、TAB、BACKSPACE、DELETE、箭头键。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes按键名,如 ENTER / ESC / TAB / BACKSPACE / DELETE / DOWN / UP / LEFT / RIGHT
tab_idNo标签页 id,省略时用最新标签页

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

The phrase 'real keyboard event' discloses that the action is a genuine OS-level keypress, which is a behavioral detail beyond the readOnlyHint=false annotation. It does not mention focus requirements or potential side effects, but the annotation already signals a mutation.

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 a single, concise sentence with no redundant wording. It includes both the action and examples, making it highly readable.

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 is sufficient for a simple key-press operation. It does not mention the output, but an output schema is present separately. The brief scope fits the tool's simplicity.

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?

The schema fully describes both parameters (key and tab_id) with clear descriptions, so the tool description adds no extra semantic value. Baseline of 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 the tool presses and releases a keyboard key, with examples of specific keys. This distinguishes it from mouse-based or element-specific actions like element_click or element_input.

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

Usage Guidelines3/5

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

The description implies usage for sending keyboard events (e.g., Enter, Esc, arrow keys) but does not explicitly contrast with alternatives like element_input or action_chain. The examples help, but explicit guidance on when to choose this over other input methods is missing.

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