Skip to main content
Glama

webview_keyboard

Type text or send keyboard events (press, down, up) in a Tauri app using CSS, XPath, or text selectors. Requires an active driver session.

Instructions

[Tauri Apps Only] Type text or send keyboard events in a Tauri app. The selector parameter (for "type" action) supports CSS selectors (default), XPath, and text content matching via the strategy parameter. Requires active driver_session. Targets the only connected app, or the default app if multiple are connected. Specify appIdentifier (port or bundle ID) to target a specific app. For browser keyboard input, use Chrome DevTools MCP instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowIdNoWindow label to target (defaults to "main")
appIdentifierNoApp port or bundle ID to target. Defaults to the only connected app or the default app if multiple are connected.
actionYesKeyboard action type: "type" for typing text into an element, "press/down/up" for key events
selectorNoElement selector for element to type into (required for "type" action): CSS selector (default), XPath, text content, or ref ID
strategyNoSelector strategy: "css" (default) for CSS selectors, "xpath" for XPath expressions, "text" to find elements by text content, with fallback to placeholder, aria-label, and title attributes. Ref IDs (e.g., "ref=e3") work with any strategy.css
textNoText to type (required for "type" action)
keyNoKey to press (required for "press/down/up" actions, e.g., "Enter", "a", "Escape")
modifiersNoModifier keys to hold
Behavior4/5

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

Description adds behavioral context beyond annotations: requires driver_session, explains selector strategies (CSS, XPath, text) and their fallback behavior, and clarifies app targeting. Annotations (readOnlyHint=false) are consistent; no contradictions. Could have mentioned side effects like clearing existing text, but sufficient for a keyboard input 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?

Three well-structured sentences: purpose, selector details, targeting/alternatives. Front-loaded with key info, no redundancy. Every sentence earns its place.

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?

Given 8 parameters and no output schema, the description covers all major aspects: action types, selector strategies, targeting logic, and requirement for driver session. Missing details like return value or error handling, but overall adequate for a moderately complex input tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, providing baseline 3. Description adds value by clarifying that selector is required for 'type' action, explaining ref IDs work with any strategy, and detailing action types. This goes beyond schema descriptions.

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?

Description clearly states 'Type text or send keyboard events in a Tauri app' with specific verb+resource. It distinguishes from sibling tools like webview_interact by focusing exclusively on keyboard input, and from browser-focused tools by noting the alternative.

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

Usage Guidelines5/5

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

Explicitly says to use Chrome DevTools MCP for browser keyboard input, provides context about requiring an active driver_session, and explains default app targeting. This gives clear when-to-use and when-not-to-use guidance.

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/hypothesi/mcp-server-tauri'

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