Skip to main content
Glama

send_control

Destructive

Send control keys or escape sequences to running commands for interrupts, TUI navigation, or non-printable input. Avoids stripping of raw control bytes common in AI frameworks.

Instructions

Send a control key or escape sequence to a running command. Use for
interrupts (ctrl+c), TUI navigation (arrows, F-keys), or any
non-printable input. Prefer this over `respond` for control keys —
AI frameworks strip raw control bytes from string arguments.

SIGNAL HANDLING: The signal parameter accepts any key name from the
supported list (case-insensitive, whitespace-tolerant — "Ctrl + C"
works). Common signals: ctrl+c (SIGINT/interrupt), ctrl+z (SIGTSTP/
suspend), ctrl+d (EOF), ctrl+\ (SIGQUIT). Local non-PTY subprocesses
only react to ctrl+c, ctrl+z, ctrl+\; SSH and PTY channels accept all.

SIDE EFFECTS: The signal may terminate the command (e.g. ctrl+c),
making the command_id invalid on the next read.

TIMEOUT INTERACTION: pause_timeout controls how long to wait for
output after the signal. Raise it for slow TUI repaints over
high-latency SSH; total_timeout only binds during active streaming.

ERRORS: Raises ValueError if command_id is invalid, already completed,
or signal name is unrecognized.

RETURNS: Same format as execute —
{"status": "completed"|"partial", "output": str, ...}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signalYesCase-insensitive key name. Values: ctrl+a..ctrl+z, ctrl+[/]/^/_/\, esc, tab, enter, return, space, backspace, up/down/left/right, home, end, pageup, pagedown, insert, delete, f1..f12, backtab, alt+<char>. Raises ValueError if unrecognized
command_idYesThe command_id from a status='partial' response. Must be an active command. Raises ValueError if invalid or already completed
pause_timeoutNoSeconds of output silence after sending the key before returning. Raise for slow TUI repaints (e.g. over high-latency SSH). Must be > 0 and ≤ total_timeout
total_timeoutNoHard cap on total call duration in seconds. Only binds while output is actively streaming. Must be ≥ pause_timeout
Behavior5/5

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

Beyond annotations (destructiveHint=true, idempotentHint=false), the description explains side effects (signal may terminate command, making command_id invalid), timeout interaction, and error handling. No contradiction with annotations.

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 well-structured with sections (signal handling, side effects, timeout interaction, errors, returns). Every sentence adds value, and the information is front-loaded with key usage guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters (2 required), no output schema, and the open-world/destructive annotations, the description fully covers behavior, return format, errors, and edge cases. It is complete for an agent to use the tool correctly.

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?

With 100% schema coverage, the description adds value by explaining signal case-insensitivity, common signals, and when to raise pause_timeout or total_timeout. It enriches understanding beyond the 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?

The description clearly states the tool sends control keys or escape sequences to a running command, listing specific use cases (interrupts, TUI navigation, non-printable input) and explicitly distinguishes it from sibling 'respond' by noting that AI frameworks strip raw control bytes.

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?

Explicit guidance is provided: 'Prefer this over respond for control keys.' It also details when to use different signals, how to adjust timeout for slow TUI repaints, and error conditions, giving clear context on when and when not to use the tool.

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