Skip to main content
Glama
vKongv

Chrome Browser Control

by vKongv

Press page keys

keypress

Dispatch DOM keyboard events to a web page. Use for typing or key combinations; fails on hidden pages unless allowHidden is enabled.

Instructions

Dispatch common DOM keyboard events in the target page. Browser/OS shortcuts are not guaranteed under MV3. Fails with DOCUMENT_HIDDEN when the document is hidden unless allowHidden=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYes
afterNoOptional act-then-observe requests, run after the page action in waitFor, snapshot, pageStatus order.
tabIdNoOptional Chrome tab id. Defaults to the claimed session tab, then the active tab.
documentIdNoExact frame document id returned by list_frames. Omit to target the current top document.
allowHiddenNoWhen true, click/type on a hidden document. Default fails with DOCUMENT_HIDDEN and names activate_tab as the remedy.
sessionTabIdNoOptional claimed tab session id returned by claim_tab.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior3/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 mentions that browser/OS shortcuts are not guaranteed under MV3 and that it fails with DOCUMENT_HIDDEN unless allowHidden=true, which adds useful context. However, it does not describe the return value, side effects, or whether the action is destructive, leaving significant gaps for a mutation tool.

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 two sentences with no waste, front-loading the primary action and then providing key behavioral caveats. It is appropriately concise and efficient for an agent to parse.

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?

The description omits critical context for correct usage: it does not explain the 'after' parameter for act-then-observe, how to specify key combinations or modifiers, or when to prefer this over sibling input tools. Given the tool's complexity and the absence of an output schema, the description leaves agents under-informed about its full capabilities and edge cases.

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 description coverage is 83%, so most parameters are documented in the schema. The description adds minimal parameter insight—only the allowHidden behavior is echoed in the error mention. Since the schema already explains allowHidden in detail, the description does not meaningfully enhance parameter understanding beyond the structured data.

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?

The description clearly states the tool dispatches common DOM keyboard events in the target page, which is a specific verb and resource. It distinguishes from sibling tools like click and type because it focuses on keyboard events, but it does not explicitly name alternatives or differentiate further. Thus, it is clear but lacks 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 Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives like type or click. The only usage-related note is about the DOCUMENT_HIDDEN failure condition, which is a behavior, not a decision rule for tool selection. There is no mention of scenarios that favor keypress over other input tools.

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