Skip to main content
Glama

create_tab

Creates a new iTerm2 tab in an existing session's window, optionally with a command, working directory, or profile, and returns the new tab's session ID.

Instructions

Create a new tab in the same window as an existing session. This is the preferred way to create new sessions — use this instead of create_window. Returns the session ID of the new tab's session.

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": {
      "session_id": "<session_id>"
    },
    "name": "create_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory to cd into after creation
commandNoCommand to execute in the new tab
profileNoiTerm2 profile name to use (omit for default profile)
session_idYesSession ID of any session in the target window (UUID from list_sessions)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does state the return value (session ID of the new tab's session), which is genuinely useful, but says nothing about failure modes, focus behavior, permissions, or what happens if the parent session's window is closed.

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?

Three short sentences, front-loaded with the action and scope, followed by the routing hint and the return value. No filler, no restatement of the tool name.

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?

For a no-annotation creation tool with a fully documented four-parameter schema and no output schema, the description covers action, preferred-alternative routing, and return value. It is only short on behavioral edge cases, which is a modest gap rather than a blocking one.

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 description coverage is 100%, so all four parameters (cwd, command, profile, session_id) are already documented in the schema. The description adds no syntax, format, or interaction detail beyond that, which is the baseline expectation when the schema does the work.

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 (create a new tab) plus the scoping constraint (in the same window as an existing session), and explicitly names the sibling it replaces. An agent can distinguish it from create_window without inspecting either schema.

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?

Gives explicit routing guidance with an alternative: 'preferred way to create new sessions — use this instead of create_window.' It does not state the conditions under which create_window would actually be correct, so the when-not side is implied rather than stated.

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