Skip to main content
Glama

wpf_send_keys

Send keyboard shortcuts to a WPF element or the current focus. Supports modifiers like Ctrl, Shift, Alt, and function keys. Uses OS keyboard input to bring the target window to the foreground.

Instructions

Send a keyboard shortcut / key combination to a WPF element (or to whatever currently has keyboard focus, when element_handle is omitted). Examples: 'Ctrl+S', 'Ctrl+Shift+F', 'Enter', 'Escape', 'F5', 'Alt+F4', 'Win+R'. Modifiers: Ctrl, Shift, Alt, Win. Keys: A-Z, 0-9, F1-F12, Enter, Esc, Tab, Space, Backspace, Delete, Insert, Home, End, PageUp, PageDown, Up, Down, Left, Right. Uses OS keyboard input - brings the target window to the foreground. STATE-CHANGING.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYes
element_handleNo
Behavior4/5

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

Without annotations, the description carries full burden and discloses key behavioral traits: uses OS keyboard input, brings target window to foreground, and is state-changing. This warns the agent about side effects. It does not cover rate limits or error conditions, but for a keystroke tool, the disclosed behaviors are sufficient.

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 a single paragraph but well-structured: action statement, examples, modifier/key lists, and behavioral note. Every sentence adds value; no redundancy. Perfectly concise for the information conveyed.

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 no output schema and no real complexity (2 simple params), the description covers all necessary aspects: what keys are accepted, how to target an element, and side effects. Missing return value info is acceptable for a void-action tool. Adequately complete.

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 has 0% description coverage, so description must compensate. It explains the 'keys' parameter with examples and valid values, and clarifies that element_handle defaults to current focus. This adds significant meaning beyond the schema's type-only definitions.

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 the action ('Send a keyboard shortcut') and the target ('to a WPF element or to whatever currently has keyboard focus'). It provides specific examples and lists valid modifiers and keys, leaving no ambiguity. No sibling tool performs key sending, so it is well-differentiated.

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

Usage Guidelines3/5

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

Description explains that element_handle is optional and that without it, keys go to the focused element. Examples illustrate common keyboard shortcuts. However, it does not explicitly state when to prefer this tool over alternatives like wpf_set_text (for typing text) or when not to use it (e.g., for non-WPF elements requiring different automation).

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/faze79/WPFVisualTreeMcp'

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