Skip to main content
Glama

batch

Execute multiple iTerm2 terminal operations sequentially in a single connection to automate workflows, manage sessions, windows, and tabs with pause controls.

Instructions

Execute a batch of iTerm2 operations sequentially within a single connection.

Each operation is a dict with an "op" field naming the operation, plus any parameters for that operation. A special "sleep" operation pauses between steps.

Args: operations: List of operation dicts. Each must have an "op" field. Available ops: session_send, session_run, session_read, session_split, session_close, session_focus, session_clear, session_set_name, session_list, session_get_variable, session_set_variable, session_restart, window_new, window_close, window_focus, tab_new, tab_close, tab_select, tab_next, tab_prev, app_activate, broadcast_on, broadcast_off, send_keystrokes, profile_apply, sleep.

    Sleep op: {"op": "sleep", "seconds": 0.5} or {"op": "sleep", "ms": 500}

    Example batch:
    [
        {"op": "session_run", "command": "echo hello"},
        {"op": "sleep", "seconds": 1.0},
        {"op": "session_read"},
        {"op": "session_send", "text": "world"}
    ]
stop_on_error: If true, abort the batch on the first error.

Returns: JSON array of results, one per operation, with index, op name, and result or error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYes
stop_on_errorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden and does well: it explains sequential execution, the special 'sleep' operation, error handling with 'stop_on_error', and the return format. It doesn't mention rate limits, authentication needs, or side effects, but covers core behavioral aspects adequately.

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?

Well-structured and appropriately sized: starts with core purpose, details parameters with examples, and ends with return format. Every sentence adds value, with no redundancy or fluff. The example batch is particularly helpful for understanding.

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's complexity (batch execution with many operation types), no annotations, and 0% schema coverage, the description is remarkably complete. It explains purpose, parameters, behavior, and includes an output schema (Returns section), making it fully self-contained for an agent.

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%, so the description must compensate fully. It provides detailed semantics for both parameters: 'operations' with available ops, examples, and sleep syntax, and 'stop_on_error' with its effect. This adds substantial meaning 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 clearly states the tool's purpose: 'Execute a batch of iTerm2 operations sequentially within a single connection.' It specifies the verb ('execute'), resource ('batch of iTerm2 operations'), and distinguishes from siblings by handling multiple operations together rather than individual actions like session_run or window_new.

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

Usage Guidelines4/5

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

The description implies when to use this tool (for executing multiple operations sequentially) but doesn't explicitly state when to use it versus individual sibling tools. It mentions 'within a single connection' which provides some context, but lacks explicit alternatives or exclusions.

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/urjitbhatia/it2mcp'

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