Skip to main content
Glama

send_to_terminal

Send text into a terminal's running program without focusing it, with optional submit. Use for typing or pasting commands into any terminal buffer.

Instructions

Type text into a terminal buffer's running program (usually a shell) by writing to its job channel. This is a mutation tool — the text reaches the program's stdin as if typed, but is not executed unless submit is true.

text: the text to send, raw. In most shells an embedded newline acts like pressing Enter, so multi-line text may execute line by line. When submit is false, trailing newlines are stripped so nothing runs by accident. terminal: which terminal to target — a buffer number or buffer name, as listed under terminals in get_state / get_state_brief. Names match exactly first, then by unique substring. Omit it when exactly one terminal exists; with several open, omitting it returns an error listing them. submit: false (default) leaves the text at the prompt for the user to review and press Enter. true appends a carriage return so the program executes it immediately. NEVER pass submit=true unless the user has explicitly asked for the command to be run — "put", "paste", "type", or "prepare" a command always means submit=false. Suggesting a command yourself is not permission to run it. When in doubt, use submit=false and let the user press Enter.

Use this whenever text needs to go into a terminal. It works regardless of focus, mode, or visibility and never moves the user's cursor — unlike send_keys, which requires focusing the terminal and juggling modes. Terminal buffers cannot be edited with the buffer tools.

Returns {sent, terminal, buf, submitted} on success — sent is the byte count actually written. On failure returns {error}, including a terminals list when the target was missing or ambiguous.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
submitNo
terminalNo
Behavior5/5

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

With no annotations, the description fully carries the behavioral transparency burden. It discloses that this is a mutation tool, explains under what conditions text is executed versus merely placed at the prompt, notes newline stripping when submit is false, describes terminal-target matching fallback to error with a list, and reports the exact return shape on success and failure. No annotation contradiction exists.

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 long but every section earns its place. It is front-loaded with the core action, then organized by parameter, then usage guidance, then return values. No redundant phrases or filler; the length is justified by the safety-critical nature and need for precise behavioral nuance.

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 the tool has no annotations and no output schema, the description is remarkably complete. It covers mutation risk, execution control, parameter disambiguation, error behavior, and return values. It even anticipates ambiguities like multiple terminals and safety-critical submit semantics, making it sufficient for an agent to invoke correctly in varied contexts.

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 description coverage is 0%, but the description compensates thoroughly. It explains the 'text' parameter with newline and execution semantics, 'terminal' with matching rules and omission behavior, and 'submit' with defaults, execution implications, and explicit safety rules. This is far more useful than any schema description could be.

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 opens with a specific verb+resource: 'Type text into a terminal buffer's running program' and immediately distinguishes it from siblings by noting it writes via the job channel, unlike send_keys or buffer edit tools. This clearly identifies what the tool does and how it differs from alternatives.

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?

The description explicitly states when to use the tool ('Use this whenever text needs to go into a terminal') and gives direct exclusions: 'unlike send_keys' and 'Terminal buffers cannot be edited with the buffer tools.' It also provides strong safety guidance about submit=false vs submit=true, with concrete examples of when not to use submit=true.

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/paulburgess1357/nvim-mcp'

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