Skip to main content
Glama

Send Keys to Agent

agent_send_keys

Send validated logical key presses—such as Esc, Ctrl+C, Enter, or Y then Enter—to an agent's interactive UI by target name or pane ID.

Instructions

Send validated logical key presses to an agent's interactive UI, such as ['esc'], ['ctrl+c'], ['enter'], ['up'], or ['y', 'enter'].

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": {
      "target": "<target>",
      "keys": "<keys>"
    },
    "name": "agent_send_keys"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysYesOrdered list of logical key names (for example ['esc'] or ['ctrl+c']).
targetYesUnique live agent name or hosting pane ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=false, so the safety profile is covered. The description adds only one behavioral detail beyond them: the word 'validated,' which suggests invalid key names are rejected. It omits important traits of a non-idempotent write tool, such as whether keys are delivered asynchronously without waiting for output, what happens if the target is not live, and whether keystrokes can race with other input.

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?

It is a single front-loaded sentence that states the action first and then gives examples, with no filler or repetition. Every clause earns its place by clarifying the input format.

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 simple two-required-parameter tool with no nested objects and no output schema, and with annotations that already cover mutability and idempotency, the definition is close to sufficient. The main remaining gap is the lack of any note on delivery semantics or how the agent observes the effect, which matters for a non-idempotent write; otherwise nothing needed to invoke it correctly is missing.

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%, and both parameters are already documented as 'Ordered list of logical key names' and 'Unique live agent name or hosting pane ID,' so the baseline is 3. The description adds a modest amount of value by listing additional key spellings ('up', 'enter', 'y') and showing that an ordered sequence can combine keys, but it does not explain ordering effects or the 'live' constraint on target.

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?

The description gives a specific verb and resource: 'Send validated logical key presses to an agent's interactive UI.' The concrete key examples (['esc'], ['ctrl+c'], ['enter'], ['up'], ['y','enter']) make it clear this takes logical key names, not raw text, and the phrase 'agent's interactive UI' implicitly scopes it to agents rather than panes. It does not explicitly name the sibling it differs from (for example pane_send_keys or pane_send_text).

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance. The definition never says to prefer this over agent_prompt, pane_send_text, or pane_send_keys, nor does it specify the situation that requires keystrokes (for example, dismissing a dialog or answering a y/n prompt) instead of sending text. Only a vague usage context is implied by 'interactive UI.'

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