Skip to main content
Glama

ui_keyboard

Dispatch native keyboard key presses or combinations (e.g., Enter, Ctrl+Z) to trigger TradingView shortcuts or dismiss modals. Requires window focus.

Instructions

Dispatch native keyboard key press or key combination (e.g., Enter, Escape, Alt+S, Ctrl+Z) via CDP Input domain. WHEN TO USE: Call when triggering application keyboard shortcuts or dismissing modals. SIDE EFFECTS: STATE_MUTATING (Dispatches keystroke events to focused window element). LIMITATIONS: Requires appropriate window focus.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey to press (e.g., "Enter", "Escape", "Tab", "a", "ArrowUp")
modifiersNoModifier keys to hold (e.g., ["ctrl", "shift"])

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares STATE_MUTATING and notes that keystroke events are dispatched to the focused window element, plus the precondition that window focus is required. It stops short of describing failure behavior, blocking/timing, or what events fire if no element is focused.

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?

Front-loaded with the action sentence, then labeled WHEN TO USE / SIDE EFFECTS / LIMITATIONS blocks. Every sentence is load-bearing; no filler or restated metadata.

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?

For a two-parameter, no-output-schema UI action tool, the description covers purpose, timing, mutation semantics, and preconditions adequately. The only real gap is ambiguity around combining the key string with the modifiers array, which neither the description nor the schema resolves.

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 100%, so both parameters are already documented in the schema, making 3 the baseline. The description's examples ('Alt+S', 'Ctrl+Z') slightly overlap the separate modifiers parameter and could imply an either/or notation, but it adds no semantics beyond what the schema provides.

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 and resource ('Dispatch native keyboard key press or key combination') with concrete examples (Enter, Escape, Alt+S, Ctrl+Z) and names the underlying mechanism (CDP Input domain). It implicitly separates itself from the neighboring ui_type_text by focusing on single keys/shortcuts, but never names that sibling, so the differentiation is inferential rather than explicit.

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?

The 'WHEN TO USE' clause gives a clear positive condition: triggering application keyboard shortcuts or dismissing modals. It does not state when-not to use it or point to the obvious alternative (ui_type_text for string entry), so the routing guidance is present but incomplete.

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