Skip to main content
Glama
tiefeiyu
by tiefeiyu

process_write

Send commands or data to a running process's standard input, enabling control of interactive programs like SSH, GDB, and REPLs.

Instructions

Write content to a process's stdin. Only available while the process is running.

Input you write reappears in the output stream (terminal echo) — treat it as your own input, not program output, and do not re-send it. To interrupt a PTY process, send  and a carriage return as two separate writes (Ctrl+C then Enter — ConPTY is line-buffered; split delivery is measurably more reliable); a KeyboardInterrupt traceback in output is expected, not an error. process_signal/process_kill are fallbacks — see their descriptions for the PTY signal mapping (CTRL_C_EVENT is a graceful interrupt, not a hard stop).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInternal process ID.
contentYesContent to write to stdin.
Behavior5/5

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

Discloses that written input reappears in the output stream as echo, cautions against re-sending it, and explains that KeyboardInterrupt traceback is expected. This goes well beyond any annotation (none provided) and covers critical PTY behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the purpose in the first sentence, followed by necessary behavioral caveats and usage guidance. It is relatively long but every sentence provides value, and the structure is logical.

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?

Covers the main usage, conditional availability, echo behavior, interrupt handling, and fallback alternatives. No output schema exists, but the description adequately addresses the tool's complexity.

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 already fully describes both parameters (id and content) with 100% coverage. The description reinforces that content is written to stdin but adds no additional parameter semantics beyond that.

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 first sentence uses a specific verb 'Write' and resource 'process's stdin', clearly differentiating it from sibling tools like process_read or process_signal. It also notes the availability constraint 'while process is running'.

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 this tool for writing input, and directs to process_signal/process_kill as fallbacks for interrupts. Provides detailed usage instructions for sending Ctrl+C via two separate writes, including the reasoning about ConPTY line-buffering.

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/tiefeiyu/Portal'

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