Skip to main content
Glama

write_to_terminal

Send text to an iTerm2 session. Optionally execute commands by appending a newline, or submit text without executing for interactive prompts.

Instructions

Send text to an iTerm2 session.

:param text: The characters to send. :param session_id: Target session UUID. Defaults to the active session. :param add_newline: If True (the default), appends \n so commands execute. Set to False to type without submitting, e.g. when filling an interactive prompt.

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": {
      "text": "<text>"
    },
    "name": "write_to_terminal"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
session_idNo
add_newlineNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description bears full behavioral burden. It discloses that adding a newline causes command execution and defaults session to active, but omits details on side effects (e.g., error handling if session is invalid) or synchronous 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 structured as a docstring with clear parameter breakdown. It is efficient without extraneous content, though slightly verbose due to reStructuredText formatting.

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

Completeness3/5

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

Given there is an output schema but no return value description, and parameter explanations are basic, the description leaves gaps (e.g., character encoding, error cases). It is adequate but not thorough.

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

Parameters4/5

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

Schema coverage is 0%, so description must compensate. It explains all three parameters: 'text' as characters, 'session_id' with default behavior, and 'add_newline' with example usage. This adds meaningful context beyond the bare 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 states 'Send text to an iTerm2 session' which is a specific verb-resource combination. It distinguishes itself from siblings like 'run_command' and 'send_control_character' by focusing on raw text input.

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

Usage Guidelines3/5

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

The description provides context for using 'add_newline' (e.g., set False for interactive prompts) but does not explicitly clarify when to use this tool versus alternatives like 'run_command' for sending commands or 'send_control_character' for control keys.

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