Skip to main content
Glama

respond

Send text input to a command waiting for a prompt response. Use to answer prompts like [Y/n] or provide passwords.

Instructions

Send text input to a command that returned status="partial" and is
waiting at a prompt. Auto-appends \n if missing.

Example: respond(command_id, "y") to answer a [Y/n] prompt.

For control keys (Ctrl+C, arrows, F-keys, ESC, etc.) use send_control
instead — AI frameworks routinely strip control characters from string
arguments before this function ever sees them.

Returns the same format as execute.

Args:
- pause_timeout: seconds of OUTPUT SILENCE before returning (default 9.0).
  Raise this (not total_timeout) when the response is expected to take
  a long time to start producing output.
- total_timeout: hard cap on call duration (default 20.0). Only binds
  while output is actively streaming.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
command_idYesThe active command_id returned in a partial status response that is waiting for input
textYesThe text input to send to the command (e.g. 'y' for prompts, passwords, etc.). Newline is auto-appended
pause_timeoutNoSeconds of output silence to wait before returning (default is 9.0)
total_timeoutNoHard cap in seconds on the maximum duration of this call (default is 20.0)
Behavior4/5

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

No annotations present, but description covers key behaviors: auto-appends \n, timeout behaviors, and return format same as execute. Minor omission of error cases.

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?

Description is concise with a clear purpose statement, example, and parameter guidance. No redundant sentences.

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 4 parameters, no output schema, and 8 sibling tools, the description is largely complete. It explains usage and timeouts, but could clarify what happens if command not in partial state.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds significant value by explaining when to adjust pause_timeout vs total_timeout, and purpose of each parameter beyond schema.

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?

Description clearly states the tool sends text input to a command waiting at a prompt, with auto-appended newline. It distinguishes from sibling send_control which handles control characters.

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

Usage Guidelines5/5

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

Explicitly states when to use (command with status=partial waiting at prompt) and when not (control keys, use send_control). Includes example and timeout 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/QiuwenZheng/interminal'

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