Skip to main content
Glama

Send input to a running program

operation_input
Destructive

Use this to type into a program started with command_run interactive=true and still running (a REPL, ssh, a program waiting for input): it sends text to the program's input, waits briefly and returns the output that followed. Send one line at a time with its line break; eof=true ends the input. The program's earlier and later output stays readable with operation_output, and operation_cancel stops it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "operationId": "<operationId>",
      "childExecutionId": "<childExecutionId>"
    },
    "name": "operation_input"
  }
}

Input Schema

NameRequiredDescriptionDefault
eofNotrue: end the program's input after the text (a program that reads to the end then finishes).
textNoText for the program's input. Include the line break a program expects after a line (\n), for example "print(2+2)\n".
waitMsNoHow long to wait for the program's reply, 0-8000 ms (default 3000). The wait ends earlier once the output pauses for 0.3 s or the program ends.
operationIdYes
childExecutionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag this as non-read-only, destructive, non-idempotent and open-world, and the description adds real behavior beyond them: it waits briefly and returns the output that followed, advises one line at a time with line breaks, and explains that eof ends the input so the program can finish. It stops short of saying what damage a wrong send could cause or how output is truncated or limited.

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?

Front-loaded with the usage trigger before any mechanics, and the trailing sentence is an efficient router to operation_output and operation_cancel. The first sentence is long and packs examples, wait semantics and return value together, but no sentence is filler.

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?

With no output schema, the description carries the burden of return behavior and does state that it returns the output that followed the input; it also covers the end-of-input path via eof. It leaves the two required identifier parameters and output-size/truncation behavior unaddressed, which matters for a destructive interactive tool.

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 coverage is 60%; eof, text and waitMs are already well documented in the schema, and the description largely restates them ('one line at a time with its line break', 'eof=true ends the input'). The two required UUID parameters, operationId and childExecutionId, are unexplained in both schema and description — notably which ID comes from command_run — which is the main semantic 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?

States a specific verb and resource ('type into a program', 'sends text to the program's input') and names the exact precondition that identifies the target: a program started with command_run interactive=true. Names the concrete examples (REPL, ssh, waiting for input) so an agent can recognize the situation without opening the schema.

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?

Gives an explicit when ('started with command_run interactive=true and still running') and routes to the alternatives by role: operation_output for earlier/later output, operation_cancel to stop. The 'still running' qualifier also implies the when-not case, so the agent knows what to do if the process has already ended.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.