Skip to main content
Glama

Send keys in sandbox

sandbox_type

Type exact text or send key chords to the focused window or a window selected by title or PID, focusing it first. Use text mode for verbatim input and keys mode for SendKeys shortcuts.

Instructions

Type text or send key chords to the focused window (or a window found by title/pid, which is focused first). mode is explicit: 'text' types the string exactly as-is; 'keys' is SendKeys syntax ({ENTER}, {TAB}, ^s, %{F4}). Prefer semantic actions (sandbox_smart_click, sandbox_ui_action setvalue) over raw typing.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "keys": "<keys>",
      "mode": "<mode>"
    },
    "name": "sandbox_type"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidNo
keysYes
modeYes'text' = verbatim, 'keys' = SendKeys syntax like {ENTER} or ^s.
literalNoDeprecated: use mode instead (true = text, false = keys).
windowTitleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-alpha.3

TDQS

A4/5.0
Behavior3/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 disclose one important side effect: a window matched by title/pid is focused first, mutating desktop state. It says nothing about failure modes (window not found, ambiguous title match), which window receives input if none is given, or what the call returns, which leaves meaningful behavioral gaps for an input-injection 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?

Two sentences, front-loaded with the action and target, then the mode contract, then the routing advice — no filler. The nested parenthetical about window lookup is slightly dense but earns its place by explaining focus behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter, no-annotation, no-output-schema tool, the description covers action, target resolution, and mode semantics well. It is incomplete on error/failure behavior, how the target window is chosen when neither pid nor windowTitle is supplied, and the deprecated parameter, which the schema alone flags.

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 only 40%, so the description must compensate, and it does for the two required parameters: 'mode' is spelled out as verbatim text versus SendKeys syntax with concrete examples ({ENTER}, {TAB}, ^s, %{F4}), and 'keys' meaning shifts with mode. 'pid' and 'windowTitle' are only implicitly covered as window selectors, and the deprecated 'literal' flag is not addressed at all.

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 (type/send keys) and resource (focused window or a window resolved by title/pid), and it explains the resolution-then-focus ordering. An agent can distinguish this from sandbox_smart_click or sandbox_ui_action without opening either schema.

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?

Explicitly routes the agent away from raw typing toward semantic siblings (sandbox_smart_click, sandbox_ui_action setvalue), which is real when-not-to-use guidance. It stops short of stating the positive condition for choosing this tool (e.g. no semantic action exists for the target control), so it is clear context but not a complete decision rule.

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