Skip to main content
Glama

send_input

Send input to an interactive PTY session and wait for output to stabilize, with optional pattern matching to block until specific output appears.

Instructions

Send input and wait for output to settle. Returns cursor_start/cursor_end for command boundary tracking, and is_complete (false = timeout, use read_output for remaining output). If wait_for is set, blocks until the pattern matches (combines send_input + read_output wait_for in one call).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes
rawNoIf true, send input exactly as-is without appending a newline. Use for interactive menus and single-character inputs (e.g. menu selections, y/n prompts). Follow with send_control('enter') when ready to submit.
session_idYes
timeout_msNoMax wait time in ms (default: 5000, max: 30000)
wait_forNoRegex pattern to wait for after sending input. Combines send_input + read_output(wait_for=...) into one tool call.
wait_for_timeoutNoTimeout in seconds for wait_for (default: 10, max: 600)
Behavior4/5

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

With no annotations, the description discloses key behaviors: returns cursor_start/cursor_end for boundary tracking, is_complete indicates timeout, and wait_for blocks until pattern matches. Timeout defaults and maximums are mentioned. Raw input behavior is explained. Some state modification is implied but not fully detailed.

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?

Three sentences efficiently cover purpose, return fields, and optional behavior. Front-loaded with main action. No superfluous content.

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, the description explains return values and timeout behavior. It covers combined operation with wait_for and raw input usage. Missing error handling details, but sufficient for normal use.

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 covers 67% of parameters with descriptions. The description does not add new parameter details beyond the schema. The two undocumented parameters (input, session_id) lack explanation, and the description does not compensate for this gap.

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?

The description clearly states the tool sends input and waits for output, distinguishing it from siblings like send_control and send_secret. It explains return fields and interaction with read_output, making the purpose unambiguous.

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?

The description provides guidance on when to use wait_for (combines send_input and read_output), and explains raw input usage for interactive menus. It lacks explicit when-not-to-use instructions but the context is clear.

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/raychao-oao/pty-mcp'

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