Skip to main content
Glama

send_keys

Sends raw OS-level keystrokes (Enter, Esc, Tab, arrows, shortcuts) to the focused 1C client window via xdotool XTEST. Use for controls needing genuine OS keys when protocol tools can't help.

Instructions

Send raw OS keystrokes (Enter / Esc / Tab / arrows / shortcuts) to the focused 1C client window. 1C keyboard input is OS-LEVEL (the key is in NO manager->client protocol frame), so raw keys are delivered via XTEST (xdotool) into the client window. Same primitive as write_form_value_xtest's DB-verified Tab/Ctrl+S.

keys is a sequence of xdotool key specs sent in order (["Down", "Down", "Return"], ["Escape"], ["ctrl+s"], ["Tab"]…). Keys go to the FOCUSED window (the launched client is the lone app window), so PREREQ: launch the client with launch_test_client(display=":89", port=…) + a window manager (matchbox); display must be that Xvfb. Most keyboard INTENTS already have a protocol tool — confirm/cancel dialogs (answer_dialog), field commit (Tab / focus-change), row navigation (select_table_row / read_list_grid), save (click_command «Записать») — use those first; send_keys is the raw-key escape hatch for controls that need genuine OS keys. Returns {keys, display, sent}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYes
displayNo:89
settle_secNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/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 so well: it discloses that keys are delivered at OS level via XTEST/xdotool rather than through any manager->client protocol frame, that input targets the FOCUSED window, and that the return shape is {keys, display, sent}. It does not explain failure behavior or the meaning/effect of the settle delay, which is the remaining gap for a no-annotation tool.

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?

Front-loaded with the core action and examples before prerequisites and routing, and every section is relevant. It is longer than strictly necessary — the parenthetical sibling enumeration is dense and partially repeats the alternatives list — but no sentence is 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?

For a low-level, OS-coupled tool this covers prerequisites, delivery mechanism, target window, alternatives, and return keys; an output schema exists so return values need not be re-explained. The only real hole is the undocumented `settle_sec` timing parameter, which affects whether keystrokes land before the app is ready.

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 description coverage is 0%, so the description must compensate, and it does for the dominant parameter: `keys` is defined as an ordered sequence of xdotool key specs with worked examples (["Down","Down","Return"], ["ctrl+s"]). `display` is explained as needing to be the Xvfb display used at launch, but the third parameter `settle_sec` is never mentioned, leaving one of three parameters undocumented in both schema and description.

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?

States a specific verb and resource ('Send raw OS keystrokes ... to the focused 1C client window') and immediately delimits it from the sibling set by naming the protocol alternatives (`answer_dialog`, `select_table_row`, `click_command`) that cover most intents. An agent can distinguish this raw-key escape hatch from the higher-level form/table tools without opening any schema.

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?

Gives explicit when-to-use ('raw-key escape hatch for controls that need genuine OS keys') and when-not-to-use ('Most keyboard INTENTS already have a protocol tool ... use those first'), with concrete sibling names mapped to intent categories. It also states the PREREQ chain (`launch_test_client(display=":89", ...)` plus a window manager) that must hold before calling.

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