Skip to main content
Glama

hid.hold_key

Hold a key for a specified duration to simulate sustained key press, useful for scrolling or panning actions.

Instructions

[Physical HID input — pick this when other automation paths (file APIs, browser automation, OS APIs) cannot accomplish the task, or when the user explicitly requests physical keyboard or mouse input.] Press a key, wait duration_ms, then release. Matches Anthropic Computer Use's hold_key action. Useful for scenarios where a single tap is too short — e.g. holding an arrow key to scroll a long list, or holding Space to pan in a design app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
duration_msNo
modifiersNo
Behavior3/5

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

No annotations provided, so description carries full burden. Describes the action sequence (press, wait, release) and duration range, but does not discuss potential side effects, permission requirements, or simulation fidelity beyond matching Anthropic's action.

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?

Three sentences, each serving a purpose: usage context, action description, and examples. No wasted words, though slightly longer than minimal. Front-loaded with critical usage instruction.

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

Completeness3/5

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

Covers action and usage well, but lacks output specification and error handling. With no output schema, description should hint at return behavior. Parameter explanation is partial.

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 0%, but description adds meaning beyond schema: explains duration_ms as wait-then-release, mentions modifiers implicitly. Does not explain key values or modifiers enum. Examples help but not exhaustive.

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?

Clearly states it holds a key for a duration, specifically for physical HID input when other automation fails. Explicitly distinguishes from siblings by referencing alternative automation paths and matching Anthropic Computer Use's hold_key.

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?

Provides explicit when-to-use guidance (other automation fails, user requests physical input) and concrete examples (scrolling, panning). However, does not explicitly exclude sibling HID tools like hid.click or hid.key.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tinqiao-oss/clawtouch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server