Skip to main content
Glama

send_input

Types text or raw key sequences into a running pty session, appending Enter by default, to control CLI processes and long-running tasks.

Instructions

Type into a running session's terminal (it runs on a pty): a line of text followed by Enter, or with raw: true exact keys such as q, \x03 (Ctrl+C) or \e[A (up arrow).

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": {
      "id": "<id>",
      "text": "<text>"
    },
    "name": "send_input"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesSession id.
rawNoSend `text` as keys, without Enter, interpreting escapes: `\r` (Enter), `\n`, `\t`, `\e` (Esc), `\\`, `\xHH` (any byte, e.g. `\x03` = Ctrl+C, `\e[A` = up arrow).
textYesText typed into the session's terminal. Enter is appended unless `raw` is true.

Output Schema

NameRequiredDescriptionDefault
okYes
stderrYes
stdoutYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.6/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 behavioral burden. It usefully discloses that the terminal runs on a pty, that Enter is appended by default, and that raw mode interprets key escapes including Ctrl+C, but it does not discuss failure modes, blocking behavior, or prerequisites beyond the session being running.

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 tightly structured sentence with no wasted wording. The core action and the normal-vs-raw mode choice are front-loaded and easy to parse.

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 three-parameter terminal-input tool with a fully described schema and an output schema, the description covers the essential behavior: typing text with Enter by default or sending exact keys in raw mode. Only minor operational details, such as behavior when the session is not running, are left unstated.

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 coverage is 100%, so the input schema already documents id, text, and raw in detail. The description reinforces the raw-vs-normal distinction and gives examples, but adds little meaning beyond the schema's own parameter descriptions.

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 states a specific verb and resource: typing into a running session's terminal, with clarification that it runs on a pty. It distinguishes normal line input (Enter appended) from raw key input, but does not explicitly differentiate this tool from close siblings like run_command or signal_session.

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?

It explains when to use raw mode versus sending a line of text, which is useful parameter-level guidance. However, it gives no explicit guidance about when to choose this tool instead of alternatives such as run_command or signal_session, leaving tool-selection guidance implied.

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