Skip to main content
Glama

Hold a key down for a duration

browser_key_hold

Holds a key down for a specified duration, then releases it, enabling game movement and drag-modifier workflows such as holding Shift while clicking.

Instructions

Press and HOLD a key for N milliseconds, then release — what you need for games (walk right, keep accelerating) and for drag-modifier workflows (hold Shift while clicking). A real keyDown is sent, the wait happens, then keyUp. Do not hold for very long; the page may repeat the key itself.

Input Schema

NameRequiredDescriptionDefault
keyYesKey to hold (e.g. "ArrowRight", "w")
contextNoTab context id (default: the active tab)
modifiersNoModifiers held at the same time
durationMsYesHow long to hold, in milliseconds

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With only readOnlyHint=false in annotations, the description carries most of the load and does it well: it discloses the actual event sequence (keyDown, wait, keyUp) and the key-repeat side effect of long holds. It doesn't mention focus requirements or what happens if the page navigates mid-hold, but the core behavior is transparent.

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 short sentences, front-loaded with the core action and followed by use cases then a safety caveat. The parenthetical game examples are slightly chatty but serve as genuine usage guidance rather than filler.

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?

No output schema exists, and the description covers mechanics, typical use cases, and the long-hold risk, which is enough for an agent to call it correctly. A note on focus/target element requirements would make it complete.

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% and each parameter is documented in-schema, so the baseline is 3. The description reinforces duration semantics and hints at the modifiers use case ('hold Shift while clicking') but adds no syntax or format detail beyond the schema.

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+resource with the exact semantics that distinguish it: press, hold for N ms, then release. The keyDown/wait/keyUp sequence makes it clearly different from a plain key press or type action. It doesn't explicitly name browser_press_key as the non-holding alternative, so it falls short of full sibling differentiation.

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?

Gives concrete when-to-use contexts (game movement, drag-modifier workflows) plus a 'do not hold for very long' caveat. Missing an explicit statement of when to prefer browser_press_key or browser_type instead, which is the main remaining inference.

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

Deploy Server

Other Tools