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
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory to cd into after creation | |
| command | No | Command to execute in the new tab | |
| profile | No | iTerm2 profile name to use (omit for default profile) | |
| session_id | Yes | Session ID of any session in the target window (UUID from list_sessions) |