Skip to main content
Glama

send_input

Send input to a PTY session and wait for output to stabilize. Optionally match a regex pattern to block until desired output appears, with timeout handling.

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
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.
inputYes
wait_forNoRegex pattern to wait for after sending input. Combines send_input + read_output(wait_for=...) into one tool call.
session_idYes
timeout_msNoMax wait time in ms (default: 5000, max: 30000)
wait_for_timeoutNoTimeout in seconds for wait_for (default: 10, max: 600)
Behavior5/5

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

No annotations provided, so description fully discloses blocking behavior, return values (cursor, is_complete), timeout handling, and raw input mode. No contradictions.

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?

Two sentences with no redundancy. First sentence states core action and return fields; second sentence explains wait_for option. Efficient and to the point.

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?

Covers main use case, critical return values, and primary behavioral nuance (wait_for). Could mention default timeout values (present in schema but not description) but overall sufficient for correct invocation.

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?

Adds meaning beyond schema: explains return values (cursor_start, cursor_end, is_complete) and clarifies raw parameter behavior ('no newline, for interactive menus') and wait_for combination. Schema covers 67% of parameters; description compensates for remaining coverage.

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?

Clear verb+resource: 'send input' with specific outcome 'wait for output to settle'. Distinguishes from siblings by mentioning combination with read_output and contrasting with send_control for raw input.

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?

Describes when to use wait_for parameter and behavior of is_complete. Implies using read_output when is_complete is false. Could explicitly mention when not to use this tool in favor of send_control or send_secret, but provides adequate guidance.

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